diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fab3d2a9..2d7a5138 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: + - "*" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..788ca5f9 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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