Skip to content

Docs Deploy

Docs Deploy #2

Workflow file for this run

name: Docs Deploy
# Build the documentation and deploy it to GitHub Pages. Triggers directly on
# push to main -- there is no longer a caller workflow multiplexing verify vs.
# deploy, so each half of that split (docs-ci.yml, this file) carries its own
# triggers and only the permissions it actually needs. Deploy is the only job
# that needs pages/id-token, which is why it stayed a separate file rather than
# folding into docs-ci.yml: a single workflow can never grant a job more
# permission than the workflow itself declares, so combining them would hand
# the gate and verify jobs credentials they have no use for.
"on":
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
packages: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: false
defaults:
run:
shell: pwsh
jobs:
deploy:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Run the build inside the published base image (template under /template
# with node_modules and PowerShell installed).
container:
image: ghcr.io/the-running-dev/docs-template:latest
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN || github.token }}
steps:
- name: Check out Repository
uses: actions/checkout@v7
- name: Configure GitHub Pages
uses: actions/configure-pages@v6
- name: Build Documentation
run: /template/scripts/docs-build.ps1 -SourceDocs ./docs -OutputPath artifacts/docs
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v5
with:
path: artifacts/docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5