Skip to content

docs: publish a documentation site on GitHub Pages #2

docs: publish a documentation site on GitHub Pages

docs: publish a documentation site on GitHub Pages #2

Workflow file for this run

name: Docs
on:
push:
branches:
- main
paths:
- doc/**
- tool/docsite/**
- .github/workflows/docs.yml
- MODULE.bazel
pull_request:
paths:
- doc/**
- tool/docsite/**
- .github/workflows/docs.yml
- MODULE.bazel
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: ./.github/actions/setup
- name: Build site
run: make docs-build
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: tool/docsite/build
deploy:
name: Deploy to GitHub Pages
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Never cancel a deploy in progress; a newer run queues behind it.
concurrency:
group: pages
cancel-in-progress: false
steps:
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1