ci(docs): build the site and deploy it to GitHub Pages

- Build the site and check all links for each pull request
- Deploy the site of dev to GitHub Pages
- Let Dependabot update the npm packages of docs/ once a month

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-05 00:17:41 +00:00
committed by Dennis Klein
parent 992db82b91
commit b8d0cf7206
2 changed files with 79 additions and 0 deletions

View File

@@ -10,3 +10,12 @@ updates:
target-branch: "dev" target-branch: "dev"
schedule: schedule:
interval: "monthly" interval: "monthly"
- package-ecosystem: "npm"
directory: "/docs"
target-branch: "dev"
schedule:
interval: "monthly"
groups:
docs:
patterns:
- "*"

70
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: Docs
on:
push:
branches: [dev]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-24.04
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v7
with:
# The site shows the version from git describe.
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends doxygen
- name: Install dependencies
run: npm ci
- name: Build the site
run: npm run build
- name: Check all links
run: npm run check
- name: Upload the site
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: docs/dist
deploy:
name: Deploy
if: github.repository == 'FairRootGroup/FairMQ' && github.event_name != 'pull_request' && github.ref == 'refs/heads/dev'
needs: build
runs-on: ubuntu-24.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5