-
Notifications
You must be signed in to change notification settings - Fork 19
50 lines (40 loc) · 1.21 KB
/
docs.yml
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
47
48
49
50
name: Build Docs
on:
push:
branches: [ main ]
release:
types: [created, edited]
pull_request:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Repo
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch origin gh-pages --depth=1
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install Dependencies
run: |
pip install uv
uv pip install ".[docs]" --system
- name: Build Docs
if: github.event_name != 'pull_request'
run: mike deploy ${{ github.ref_name }}
- name: Test Build Docs
if: github.event_name == 'pull_request'
run: mike deploy pr_test
- name: Tag with latest
if: github.event_name == 'release' && github.event.action == 'created'
run: mike alias -u ${{ github.ref_name }} latest
- name: Push deployment
if: github.event_name != 'pull_request'
run: git push origin gh-pages