-
Notifications
You must be signed in to change notification settings - Fork 12
38 lines (31 loc) · 922 Bytes
/
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
---
name: Docs
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Check if release
id: setup
run: |
echo "IS_RELEASE=${{
github.event_name == 'push' && github.ref == 'refs/heads/main'
}}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- name: Upgrade jinja
run: pip install -U jinja2
- name: Install Python dependencies
run: pip install -r requirements-doc.txt
- name: Build
run: |
if [ "${{ steps.setup.outputs.IS_RELEASE }}" == "true" ]; then
O="-t release"
fi
make html O="$O"
- name: Publish
if: ${{ steps.setup.outputs.IS_RELEASE == 'true' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
force_orphan: true