-
-
Notifications
You must be signed in to change notification settings - Fork 123
55 lines (47 loc) · 1.3 KB
/
publish-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
51
52
53
54
55
name: Build and publish documentation
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install quartodoc and griffe
run: |
python -m pip install --upgrade pip
python -m pip install quartodoc==0.6.1
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.2.280 # since this is my local version, we could change it
- name: Build docs
shell: bash
run: |
python -m quartodoc build --config docs/_quarto.yml
quarto render docs
touch docs/_site/.nojekyll
- name: Publish to GitHub
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') # Only from main or a tag
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
render: false
path: docs/_site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}