-
Notifications
You must be signed in to change notification settings - Fork 54
46 lines (38 loc) · 1 KB
/
pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build/Deploy Documentation
on:
# So we can trigger manually if needed
workflow_dispatch:
# To confirm any changes to docs build successfully, without deploying them
pull_request:
paths:
- "docs/**"
- ".github/workflows/pages.yaml"
- "mkdocs.yml"
# Pushes to branches do the full build + deployment
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/pages.yaml"
- "mkdocs.yml"
permissions:
contents: write
# Don't allow multiple simultaneous instances because that would make deploying the docs nondeterministic
concurrency:
group: ${{ github.workflow }}
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
# Deploy on merge
- run: make deploy-docs
if: github.event_name == 'push'
# Only build on everything else
- run: make build-docs
if: github.event_name != 'push'