From 3b4ebee05c22ad7128e6ae201ccc650f05e6ee33 Mon Sep 17 00:00:00 2001 From: Kaan Yagci Date: Mon, 2 Mar 2026 21:58:45 +0100 Subject: [PATCH 1/2] fix(docs): harden pages workflow deployment conditions --- .github/workflows/docs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 85e4ef2..e3b0e89 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,6 +26,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Setup Python uses: actions/setup-python@v5 with: @@ -43,6 +46,7 @@ jobs: path: site deploy: + if: github.ref == 'refs/heads/main' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} From 36c376850739887186d409a6404e75c45b788bbf Mon Sep 17 00:00:00 2001 From: Kaan Yagci Date: Tue, 3 Mar 2026 13:13:58 +0100 Subject: [PATCH 2/2] docs: migrate docs URLs and CNAME to buildgraph.dev --- AGENTS.md | 2 +- docs/CNAME | 2 +- docs/README.md | 19 +++++++++--- docs/index.md | 62 ++++++++++++++++++++++++++++++++------- internal/analyze/rules.go | 2 +- mkdocs.yml | 6 ++-- 6 files changed, 73 insertions(+), 20 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 23b8456..be93edc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,4 +27,4 @@ - 2026-02-26: Formalized stable JSON envelope contract with `schemaVersion` and always-present `errors` array. - 2026-02-26: Doctor UX now includes attempt trail, resolved backend details, paste-ready config snippet, and remediation guidance. - 2026-02-26: Minimum required Go version is Go 1.26 for local builds and CI/release workflows. -- 2026-03-02: Documentation is published via MkDocs + GitHub Pages workflow (`.github/workflows/docs.yml`) with custom domain `docs.buildgraph.dev`. +- 2026-03-03: Documentation is published via MkDocs + GitHub Pages workflow (`.github/workflows/docs.yml`) with custom domain `buildgraph.dev`. diff --git a/docs/CNAME b/docs/CNAME index 36b9a58..d83a67f 100644 --- a/docs/CNAME +++ b/docs/CNAME @@ -1 +1 @@ -buildgraph.dev \ No newline at end of file +buildgraph.dev diff --git a/docs/README.md b/docs/README.md index c8e9951..5f0b55f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,9 @@ -# Buildgraph Documentation +# Buildgraph Documentation Source -This directory contains the source content for the public documentation URLs used by `buildgraph` findings. +This directory contains the source content for: + +- the landing page (`docs/index.md`) +- rule pages used by `buildgraph analyze` finding links ## Rules @@ -10,5 +13,13 @@ Each rule page is named after its rule ID, for example: - `docs/rules/BG_REPRO_FROM_MUTABLE.md` - `docs/rules/BG_SEC_ROOT_USER.md` -These pages are designed to map directly to public URLs under: -- `https://docs.buildgraph.dev/rules/` +Rule pages are designed to map directly to public URLs under: +- `https://buildgraph.dev/rules/` + +## Domain Note + +The current Pages custom domain file is: + +- `docs/CNAME` (currently set to `buildgraph.dev`) + +If you want to move docs to a subdomain later, update this file and DNS records accordingly. diff --git a/docs/index.md b/docs/index.md index 324e958..196ca7f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,18 +1,60 @@ -# Buildgraph Documentation +# Buildgraph -Buildgraph publishes rule-level guidance for findings reported by `buildgraph analyze`. +Buildgraph is a Build Intelligence CLI for BuildKit-first workflows. -## Primary Sections +## Install -- [Rules Overview](./rules/index.md) +### From source (Go 1.26+) + +```bash +go build ./cmd/buildgraph +``` + +### Prebuilt binaries + +#### Linux (amd64) + +```bash +curl -sSfL -o buildgraph_linux_amd64.tar.gz \ + https://github.com/Makepad-fr/buildgraph/releases/latest/download/buildgraph_linux_amd64.tar.gz +tar -xzf buildgraph_linux_amd64.tar.gz +sudo install -m 0755 buildgraph /usr/local/bin/buildgraph +``` + +#### macOS (amd64) -## Public Rule URLs +```bash +curl -sSfL -o buildgraph_darwin_amd64.tar.gz \ + https://github.com/Makepad-fr/buildgraph/releases/latest/download/buildgraph_darwin_amd64.tar.gz +tar -xzf buildgraph_darwin_amd64.tar.gz +chmod +x buildgraph +mv buildgraph /usr/local/bin/buildgraph +``` -Finding links are designed to resolve under: +#### Windows (amd64) -- `https://docs.buildgraph.dev/rules/` +```powershell +Invoke-WebRequest -Uri "https://github.com/Makepad-fr/buildgraph/releases/latest/download/buildgraph_windows_amd64.zip" -OutFile "buildgraph_windows_amd64.zip" +Expand-Archive -Path ".\\buildgraph_windows_amd64.zip" -DestinationPath ".\\buildgraph" +``` + +## 30-Second Quickstart + +```bash +buildgraph build \ + --context . \ + --file Dockerfile \ + --image-ref ghcr.io/acme/app:dev \ + --progress=human \ + --trace ./buildgraph.trace.jsonl + +buildgraph top --from ./buildgraph.trace.jsonl --limit 5 +``` + +## Documentation + +- [Rules Overview](./rules/index.md) -Examples: +Rule links emitted by `buildgraph analyze` resolve under: -- `https://docs.buildgraph.dev/rules/BG_REPRO_FROM_MUTABLE` -- `https://docs.buildgraph.dev/rules/BG_SEC_ROOT_USER` +- `https://buildgraph.dev/rules/` diff --git a/internal/analyze/rules.go b/internal/analyze/rules.go index 2f14d3d..5220ad6 100644 --- a/internal/analyze/rules.go +++ b/internal/analyze/rules.go @@ -5,7 +5,7 @@ import ( "github.com/Makepad-fr/buildgraph/internal/policy" ) -const docsBase = "https://docs.buildgraph.dev/rules/" +const docsBase = "https://buildgraph.dev/rules/" func BuiltinRules() map[string]policy.Rule { return map[string]policy.Rule{ diff --git a/mkdocs.yml b/mkdocs.yml index 396ed50..93f3588 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: Buildgraph Docs -site_description: Documentation for Buildgraph rules and CLI diagnostics. -site_url: https://docs.buildgraph.dev +site_name: Buildgraph +site_description: Build Intelligence CLI for BuildKit-first workflows. +site_url: https://buildgraph.dev docs_dir: docs site_dir: site exclude_docs: |