Skip to content
Open
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
5 changes: 3 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ just ci # ci-rust + nix flake check
just docs # mdBook build
```

The GitHub workflow jobs currently use `if: false`, so hosted checks are
skipped. Run the recipes locally and report that distinction in the PR.
GitHub workflows call the same recipes. The Docs workflow builds pull
requests and `main`, then uploads the book as a Pages artifact. Only pushes
and manual runs on `main` publish it through the `github-pages` environment.

For dependency policy checks:

Expand Down
38 changes: 37 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@ on:
branches: [main]
paths:
- "docs/**"
- "CHANGELOG.md"
- "Justfile"
- ".github/actions/setup-nix/**"
- ".github/actions/setup-rust/**"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- "CHANGELOG.md"
- "Justfile"
- ".github/actions/setup-nix/**"
- ".github/actions/setup-rust/**"
- ".github/workflows/docs.yml"
workflow_dispatch:

concurrency:
group: pages-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read
pages: read

jobs:
build:
Expand All @@ -30,6 +39,9 @@ jobs:
with:
persist-credentials: false

- name: Configure Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Install Nix
uses: ./.github/actions/setup-nix

Expand All @@ -40,3 +52,27 @@ jobs:

- name: Build book
run: just docs

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/book

deploy:
name: Deploy book
needs: build
if: >-
github.ref == 'refs/heads/main' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
4 changes: 4 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
install-cargo-audit: "false"

- name: nix flake check
env:
NIX_CONFIG: "access-tokens = github.com=${{ github.token }}"
run: just flake-check

- name: nix flake check (eval-only, all systems)
env:
NIX_CONFIG: "access-tokens = github.com=${{ github.token }}"
run: just flake-check-eval-all
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,17 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and helper tools use pinned versions. Nix installer temporary files
work with GNU and macOS `mktemp`.
Nix setup extends existing feature settings with `nix-command` and `flakes`.
Nix checks authenticate GitHub input fetches with their read-only job
token.
Cargo tool installation honors `CARGO_INSTALL_ROOT` and `CARGO_HOME` and
verifies the selected executables before adding their directory to `PATH`.
- Runs formatting, Clippy, and Markdown lint from pre-commit hooks.
Pre-push hooks run the Rust gate, dependency policy, and advisory checks.
The Rust gate includes native, release, and Linux-target Clippy; the
toolchain configuration includes `x86_64-unknown-linux-gnu`.
- Builds documentation on pull requests and publishes `main` through
GitHub Pages. Deployment uses official actions pinned to full commits
and a `main`-restricted `github-pages` environment.
- Keeps Markdown lint rules in `.markdownlint-cli2.jsonc` and excludes
generated Cargo and mdBook output. Dependency policy checks duplicate
crate versions, sources, licenses, and advisories, with a documented
Expand Down
Loading