Debian Codegraph @

.github/workflows/sphinx.yml

raw
1 name: Sphinx
2 on:
3 push:
4 branches:
5 - main
6
7 pull_request:
8 branches:
9 - main
10
11 concurrency:
12 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13 cancel-in-progress: true
14
15 jobs:
16 sphinx:
17
18 runs-on: ubuntu-latest
19
20 steps:
21 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
23 with:
24 python-version: "3.x"
25 architecture: "x64"
26 cache: "pip"
27 - name: Build Documentation
28 run: |
29 pip install -e .[docs]
30 pip install -r docs/requirements.txt # redundant?
31 make html
32 - name: Upload artifact
33 uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
34 with:
35 # Upload entire repository
36 path: 'build/html'
37
38 pages:
39
40 runs-on: ubuntu-latest
41 if: github.ref == 'refs/heads/main'
42 needs: [sphinx]
43
44 # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
45 permissions:
46 contents: read
47 pages: write
48 id-token: write
49
50 environment:
51 name: github-pages
52 url: ${{ steps.deployment.outputs.page_url }}
53
54 steps:
55 - name: Deploy to GitHub Pages
56 id: deployment
57 uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0