-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (36 loc) · 1.2 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
name: Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
defaults:
run:
# See https://github.com/mamba-org/setup-micromamba#about-login-shells
shell: bash -l {0}
jobs:
docs:
name: "GitHub Pages"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Checkout Git repository"
uses: actions/checkout@v3
- name: "Install Conda environment with Micromamba"
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
environment-file: doc/environment.yml
environment-name: pink
- name: "Build documentation"
run: |
sphinx-build doc _build -W
- name: "Deploy to GitHub Pages"
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true