The Publish documentation workflow builds
the end-user documentation selected in mkdocs.yml and renders the
anvil-terra-poc-presentation.md Marp deck.
It publishes both outputs as one GitHub Pages site. Do not edit or commit the
generated HTML. The Pages build explicitly selects Marp's bespoke template;
that template includes the browser runtime used for slide paging and keyboard
navigation, unlike the non-interactive bare template. It renders the deck to
a temporary build directory and copies the finished standalone HTML into the
site after MkDocs runs, preserving the embedded runtime and presentation styles.
An administrator only needs to configure Pages once for the repository:
- Open the repository on GitHub and select Settings.
- Select Pages under Code and automation.
- Under Build and deployment, set Source to GitHub Actions.
- If GitHub prompts you to enable Actions, open Settings → Actions → General, allow GitHub Actions to run, and save the setting.
- Open Actions → Publish documentation, select Run workflow, choose the
mainbranch, and select Run workflow. - When the workflow finishes, its
deployjob shows the published site URL. The URL also appears in Settings → Pages.
The repository must permit the official actions used by the workflow. If the organization restricts actions, allow these actions and their pinned major versions:
actions/checkout@v4actions/configure-pages@v5actions/setup-python@v5actions/upload-pages-artifact@v3actions/deploy-pages@v4
The workflow declares the required pages: write and id-token: write
permissions itself. No deploy key, personal access token, or gh-pages branch
is required.
After Pages is enabled, push a change under docs/, mkdocs.yml, or the Pages
workflow to main. The workflow runs automatically, renders the selected
Markdown pages with MkDocs, renders the deck with the pinned Marp CLI version,
and deploys the combined site. A maintainer can also publish without a content
change by running the workflow manually from the Actions tab.
The generated site includes:
/index.html
/quickstart/
/getting-started/
/commands/
/pointer-files/
/adding-s3-files/
/remove-files/
/troubleshooting/
/anvil-terra-poc-presentation.html
If the repository's default publishing branch is not main, update the
on.push.branches value in .github/workflows/pages.yaml before relying on
automatic deployments.
With Python, Node.js, and npm installed, stage the selected end-user pages and build the same combined site as CI:
python -m pip install mkdocs-material==9.6.14
rm -rf .pages-docs _site
mkdir .pages-docs
cp docs/{index,quickstart,getting-started,commands,pointer-files}.md .pages-docs/
cp docs/{adding-s3-files,remove-files,troubleshooting}.md .pages-docs/
cp docs/*.png .pages-docs/
npx --yes @marp-team/marp-cli@4.2.3 \
docs/anvil-terra-poc-presentation.md \
--html \
--template bespoke \
--output /tmp/anvil-terra-poc-presentation.html
mkdocs build --strict
cp /tmp/anvil-terra-poc-presentation.html \
_site/anvil-terra-poc-presentation.html
python -m http.server --directory _site 8000Open http://localhost:8000/ in a browser. Keep dependency versions in these
commands synchronized with .github/workflows/pages.yaml when upgrading the
documentation toolchain.
- The workflow does not start after a push: confirm the change is on
mainand touchesdocs/**,mkdocs.yml, or.github/workflows/pages.yaml. - The deploy job reports that Pages is not enabled: repeat the enablement steps and confirm the Pages source is GitHub Actions, not Deploy from a branch.
- An action is blocked: ask an organization owner to allow the five official GitHub actions listed above.
- The page is not immediately available: wait for the
deployjob to finish and use the URL shown in that job rather than guessing the repository URL.