2023-07-26 08:26:56 +01:00
|
|
|
name: CI
|
|
|
|
|
2024-02-13 23:16:21 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
# Allow running manually
|
|
|
|
workflow_dispatch:
|
2023-07-26 08:26:56 +01:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2024-02-13 23:16:21 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2023-07-26 08:26:56 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2024-02-13 23:16:21 +00:00
|
|
|
|
2023-07-26 08:26:56 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2024-02-13 23:16:21 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v4
|
2023-07-26 08:26:56 +01:00
|
|
|
with:
|
2024-02-13 23:16:21 +00:00
|
|
|
python-version: '3.11'
|
|
|
|
cache: 'pip'
|
|
|
|
|
|
|
|
- run: pip install -r requirements.txt
|
|
|
|
|
|
|
|
- name: Setup Pages
|
|
|
|
uses: actions/configure-pages@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
mkdocs build -v
|
2023-07-26 08:26:56 +01:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
2024-02-13 23:16:21 +00:00
|
|
|
path: ./site
|
2023-07-26 08:26:56 +01:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
|
|
|
|
if: github.ref_name == 'master'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v1
|