| 1 |
name: Build documentation |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
|
| 8 |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
| 9 |
permissions: |
| 10 |
contents: read |
| 11 |
pages: write |
| 12 |
id-token: write |
| 13 |
|
| 14 |
# Allow one concurrent deployment |
| 15 |
concurrency: |
| 16 |
group: "pages" |
| 17 |
cancel-in-progress: true |
| 18 |
|
| 19 |
# Default to bash |
| 20 |
defaults: |
| 21 |
run: |
| 22 |
shell: bash |
| 23 |
|
| 24 |
jobs: |
| 25 |
build: |
| 26 |
|
| 27 |
runs-on: ubuntu-latest |
| 28 |
|
| 29 |
steps: |
| 30 |
- uses: actions/checkout@v6 |
| 31 |
- name: Set up Python |
| 32 |
uses: actions/setup-python@v6 |
| 33 |
with: |
| 34 |
python-version: '3.12' |
| 35 |
- name: Install dependencies |
| 36 |
run: | |
| 37 |
python -m pip install --upgrade pip |
| 38 |
pip install -r requirements_dev.txt |
| 39 |
- name: Build |
| 40 |
run: mkdocs build |
| 41 |
- name: Upload artifact |
| 42 |
uses: actions/upload-pages-artifact@v5 |
| 43 |
with: |
| 44 |
path: ./site |
| 45 |
|
| 46 |
deploy: |
| 47 |
environment: |
| 48 |
name: github-pages |
| 49 |
url: ${{ steps.deployment.outputs.page_url }} |
| 50 |
runs-on: ubuntu-latest |
| 51 |
needs: build |
| 52 |
steps: |
| 53 |
- name: Deploy to GitHub Pages |
| 54 |
id: deployment |
| 55 |
uses: actions/deploy-pages@v5 |