From 1605539b713e818e41703fcaf6a19bc724d16426 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Wed, 8 Apr 2026 06:40:51 -0400 Subject: [PATCH 1/4] ci: Trigger Pages deploy from Release workflow directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pages hasn't deployed since January because the tag glob pattern in gh-page.yml didn't match the new CalVer+build metadata tags. Instead of fixing the pattern, call gh-page.yml directly from the Release workflow via workflow_call — this is more reliable and makes the dependency explicit. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/gh-page.yml | 3 --- .github/workflows/release.yml | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-page.yml b/.github/workflows/gh-page.yml index 7154dd7..a05e555 100644 --- a/.github/workflows/gh-page.yml +++ b/.github/workflows/gh-page.yml @@ -1,9 +1,6 @@ name: Build Github Pages on: - push: - tags: - - '**[0-9]+.[0-9]+.[0-9]+*' workflow_call: jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 748d25a..8451537 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,3 +161,8 @@ jobs: --title "v${VERSION}" \ --notes "" \ artifacts/*.tar.gz + + pages: + name: Deploy Github Pages + needs: release + uses: ./.github/workflows/gh-page.yml From a24ac6c241afb20766957acb6b73a0ebfea4beec Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Wed, 8 Apr 2026 06:43:13 -0400 Subject: [PATCH 2/4] docs: Add CI workflow README with mermaid diagram Also add CLAUDE.md to remind AI assistants to keep the README in sync when workflows are modified. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/CLAUDE.md | 1 + .github/workflows/README.md | 51 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/CLAUDE.md create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/CLAUDE.md b/.github/workflows/CLAUDE.md new file mode 100644 index 0000000..480ac97 --- /dev/null +++ b/.github/workflows/CLAUDE.md @@ -0,0 +1 @@ +When modifying any workflow file in this directory, update README.md to reflect the changes. This includes the mermaid diagram, the workflow table, and the notes section. diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 0000000..7383163 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,51 @@ +# CI Workflows + +```mermaid +flowchart LR + PR["Pull Request"] -->|"*.rs, Cargo.*"| Tests + PR -->|"docs/**"| Docs + + Push["Push to main"] --> Release + Manual["Manual dispatch"] --> Release + + subgraph Tests["Tests Workflow"] + T1["build, check, test, fmt, clippy
ubuntu-latest"] + end + + subgraph Docs["Docs Workflow"] + D1["Build docs via workflow_call"] + end + + subgraph Release["Release Workflow"] + direction TB + R1["Prepare Release
ubuntu-latest"] + R2["Push Release Branch + Tag
gusto-ubuntu"] + R3["Build 4 targets in parallel
ubuntu-latest + macos-latest"] + R4["Create GitHub Release
gusto-ubuntu"] + R5["Deploy GitHub Pages
ubuntu-latest"] + R1 --> R2 --> R3 --> R4 --> R5 + end + + subgraph Pages["Build Github Pages"] + direction TB + P1["Build Docusaurus site"] --> P2["Deploy to Pages"] + end + + Docs --> Pages + R5 --> Pages +``` + +## Workflow files + +| File | Trigger | What it does | +|---|---|---| +| `test.yml` | PR (Rust/Cargo files) | cargo build, check, test, fmt, clippy | +| `docs.yml` | PR (docs/ files) | Calls `gh-page.yml` to verify docs build | +| `release.yml` | Push to main, manual dispatch | CalVer stamp, cross-compile 4 targets, create GitHub release, deploy Pages | +| `gh-page.yml` | `workflow_call` only | Build Docusaurus site and deploy to GitHub Pages | + +## Notes + +- **Runner split**: Most jobs use GitHub-hosted runners (`ubuntu-latest`, `macos-latest`). Jobs that need write access (git push, release creation) use `gusto-ubuntu-default` due to the Gusto org IP allow list. +- **Version format**: CalVer `YEAR.MONTH.DAY+HHMM` (e.g., `2026.4.7+1823`). The `+HHMM` build metadata is ignored by Cargo for version comparison but ensures unique tags. See the comment in `release.yml` for details. +- **Pages deployment**: Triggered by the Release workflow via `workflow_call`, not by tag patterns. From 6b7a02443049ffe856b03337bbc66f1a39a5487d Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Wed, 8 Apr 2026 07:09:53 -0400 Subject: [PATCH 3/4] docs: Update docusaurus config from oscope-dev to Gusto org Update URL, organizationName, editUrl, and GitHub links to point at the Gusto org after the repo transfer. Co-Authored-By: Claude Opus 4.6 --- docs/docusaurus.config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 0b57ae7..93a6240 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -8,14 +8,14 @@ const config: Config = { // favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://oscope-dev.github.io/', + url: 'https://Gusto.github.io/', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/scope', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'oscope-dev', // Usually your GitHub org/user name. + organizationName: 'Gusto', // Usually your GitHub org/user name. projectName: 'scope', // Usually your repo name. onBrokenLinks: 'throw', @@ -41,7 +41,7 @@ const config: Config = { // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: - 'https://github.com/oscope-dev/scope/tree/main/docs/', + 'https://github.com/Gusto/scope/tree/main/docs/', }, theme: { customCss: './src/css/custom.css', @@ -72,7 +72,7 @@ const config: Config = { label: 'Docs', }, { - href: 'https://github.com/oscope-dev/scope', + href: 'https://github.com/Gusto/scope', label: 'GitHub', position: 'right', }, @@ -95,7 +95,7 @@ const config: Config = { items: [ { label: 'GitHub', - href: 'https://github.com/oscope-dev/scope', + href: 'https://github.com/Gusto/scope', }, ], }, From e0276553259b542202bed845a928089271fc61a9 Mon Sep 17 00:00:00 2001 From: Chris McClellan Date: Wed, 8 Apr 2026 07:15:17 -0400 Subject: [PATCH 4/4] docs: Use docs.gusto.com as Pages URL Gusto's org has a custom domain for GitHub Pages. Co-Authored-By: Claude Opus 4.6 --- docs/docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 93a6240..be0b40e 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -8,7 +8,7 @@ const config: Config = { // favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://Gusto.github.io/', + url: 'https://docs.gusto.com', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/scope',