mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
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:
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
@@ -10,3 +10,12 @@ updates:
|
||||
target-branch: "dev"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/docs"
|
||||
target-branch: "dev"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
groups:
|
||||
docs:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
70
.github/workflows/docs.yml
vendored
Normal file
70
.github/workflows/docs.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user