Skip to content

Publish to GitHub Pages

Publish the viewer to GitHub Pages from GitHub Actions, checked and rebuilt on every push to the default branch.

  • The Workspace is in a GitHub repo, and archidocs check passes. See the Quick start.
  • You can change the repo’s settings.

Add this file to the Workspace repo. The Archidocs GitHub Action checks the Workspace, builds the site and deploys it:

.github/workflows/architecture.yml
name: Architecture
on:
push:
branches: [main]
tags: ["*"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.archidocs.outputs.page-url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: chalharb/archidocs@v1
id: archidocs

Keep fetch-depth: 0: the site shows past Revisions, Workspace states at past commits, and builds them from git. Every input, such as working-directory, keep and version, is in the GitHub Action reference.

In the repo, set Settings › Pages › Source to GitHub Actions.

Commit the workflow and push it to the default branch. The Action runs on every push to the default branch and on every tag.

Open the workflow run in the repo’s Actions tab. When it succeeds, the publish job shows the site’s URL, the Action’s page-url output. Open it: the viewer starts on the C1 Landscape.

If archidocs check fails, the Action stops and deploys nothing, so the last good site stays up. The run’s log shows the file, the line and the rule, with a link to the rule’s page. Fix it and push again.

If the deploy step fails with a permissions error, check that the workflow grants pages: write and id-token: write, and that Pages’ source is GitHub Actions.

If the viewer shows only the latest Revision, the checkout is shallow. Set fetch-depth: 0 on actions/checkout.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.