master
yml 49 lines 1.2 KB
Raw
1 name: Build documentation
2 on:
3 workflow_dispatch:
4 push:
5 branches: [main, master]
6 paths: ['doc/**']
7 pull_request:
8 paths: ['doc/**']
9
10 concurrency:
11 group: ${{ github.workflow }}-${{ github.ref }}
12 cancel-in-progress: true
13
14 jobs:
15 Build:
16 runs-on: ubuntu-latest
17 permissions:
18 contents: read
19 steps:
20 - name: Checkout actions
21 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
23 - name: Install packages
24 run: pip install -r doc/requirements.txt --break-system-packages
25 shell: bash
26
27 - name: Build documentation
28 run: mkdocs build -f doc/mkdocs.yml
29 shell: bash
30
31 - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
32 with:
33 path: doc/site
34
35 DeployDocs:
36 needs: Build
37 if: github.event_name == 'push'
38 environment:
39 name: github-pages
40 url: ${{ steps.deployment.outputs.page_url }}
41 runs-on: ubuntu-latest
42 permissions:
43 contents: read
44 pages: write
45 id-token: write
46 steps:
47 - name: Deploy to GitHub Pages
48 id: deployment
49 uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1