mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
- 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>
71 lines
1.5 KiB
YAML
71 lines
1.5 KiB
YAML
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
|