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
44 changes: 0 additions & 44 deletions .github/workflows/guide.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Deploy docs site to Pages
on:
push:
branches: [main, master]
workflow_dispatch:
pull_request:
paths:
- guide/**
- crates/build-user-guide/**
- crates/build-xtask/src/site.rs
- .github/workflows/site.yml
permissions:
contents: read
# Deploys share the `pages` group and never cancel one another. PR runs get
# their own group, so they never queue behind a deploy, and a new push to a
# PR cancels its stale run.
concurrency:
group: ${{ github.event_name == 'pull_request' && format('site-pr-{0}', github.ref) || 'pages' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# Forks have no Pages site for these docs; skip both jobs there.
build:
if: github.repository == 'cppalliance/promptforge'
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.44
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable

- name: Cache cargo
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2

- name: Install mdBook
run: |
wget -q "https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
tar xzf "mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz"

# The ci.yml docs job already builds both facade rustdocs on every PR,
# so PR runs build only the books and the landing page.
- name: Build books
if: github.event_name == 'pull_request'
run: MDBOOK="$PWD/mdbook" cargo xtask site --books-only

- name: Build site
if: github.event_name != 'pull_request'
run: MDBOOK="$PWD/mdbook" cargo xtask site

- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: target/site
deploy:
if: github.repository == 'cppalliance/promptforge' && github.event_name != 'pull_request'
needs: build
# The Pages permissions live only on this job, which never runs on PRs.
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/vibe-review.md
/conformance-audit.md
/local/
/guide/book/
/guide/scratch/
*.env
# Standing guard: the operator's real secrets file must never be tracked.
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Multi-crate Rust workspace for the PromptForge pipeline engine, the harness that
- Full suite: `cargo nextest run --locked --workspace --exclude workshop --exclude workshop-server --exclude workshop-server-api --all-features`, then doctests via `cargo test --workspace --exclude workshop --exclude workshop-server --exclude workshop-server-api --all-features --doc`; workshop crates separately: `cargo nextest run --locked -p workshop -p workshop-server -p workshop-server-api`.
- Linter: `cargo clippy --workspace --exclude workshop --exclude workshop-server --exclude workshop-server-api --all-targets --all-features -- -D warnings` (workshop: `cargo clippy -p workshop -p workshop-server -p workshop-server-api --all-targets -- -D warnings`). Clippy is a superset of `cargo check` and shares no artifacts with it, so never run a standalone `cargo check --workspace` beside the clippy runs; the one exception is the headless feature-combination gate `cargo check -p gateway --no-default-features`, which checks a build shape clippy --all-features does not cover.
- Formatter: `cargo fmt --all --check`.
- Docs: `cargo doc --workspace --no-deps --all-features --exclude workshop --exclude workshop-server --exclude workshop-server-api` with `RUSTDOCFLAGS="-D warnings"`; user guide: `mdbook build guide`. Rustdoc lints are not covered by clippy; never skip the docs gate.
- Docs: `cargo doc --workspace --no-deps --all-features --exclude workshop --exclude workshop-server --exclude workshop-server-api` with `RUSTDOCFLAGS="-D warnings"`; user guide: `cargo xtask site --books-only`. Rustdoc lints are not covered by clippy; never skip the docs gate.
- Facade docs: `RUSTDOCFLAGS="-D warnings" cargo doc -p promptforge --no-deps`, without `--all-features`, so the facade's docs build with default features.
- Facade surface: `cargo +<pinned nightly> xtask api --check`, where the pinned nightly is the one named in `crates/build-xtask/src/api/toolchain.rs`; on any other toolchain it fails at once, naming the nightly it needs. It checks that every path a surface item's signature, fields, bounds, impls, or doc links name is a facade re-export (or std, core, alloc, or an allowlisted crate), that no surface doc text names an internal crate, and that the surface listing matches the committed `crates/promptforge/public-api.txt`.
- Boundary and structural harness: `cargo test -p build-xtask`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ flowchart LR

- [PromptForge Guide](https://cppalliance.github.io/promptforge/) - four documentation sets: the Workshop, the gateway, the prompt language, and agent programs

Build the guide locally with `mdbook build guide`.
Build the guide locally with `cargo xtask site --books-only`.

![Filing cabinets](images/banner-06.png)

Expand Down
2 changes: 1 addition & 1 deletion crates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The build-script helper that bundles a crate's `ui/` with esbuild into `OUT_DIR`

## build-user-guide

Assembles the user guide from `guide/src/<set>/` into the summary, per-part indexes, and the assembled exports. Run by hand and in CI; nothing depends on it. No workspace dependencies.
Checks the user guide chapters in `guide/src/<set>/` and writes the per-set exports. Its `stage <out>` mode writes one mdBook tree per book, with each book's summary and per-part indexes, for `cargo xtask site`. Run by hand and in CI; nothing depends on it. No workspace dependencies.

## build-workshop

Expand Down
Loading
Loading