Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -43,6 +46,7 @@ jobs:
path: site

deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
buildgraph.dev
buildgraph.dev
19 changes: 15 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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_ID>`
Rule pages are designed to map directly to public URLs under:
- `https://buildgraph.dev/rules/<RULE_ID>`

## 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.
62 changes: 52 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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/<RULE_ID>`
```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/<RULE_ID>`
2 changes: 1 addition & 1 deletion internal/analyze/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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: |
Expand Down