-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.1 KB
/
docbuild-and-upload.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
name: Doc Build and Upload
on:
push:
branches:
- sg_docs
env:
ENV_FILE: environment.yml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
jobs:
web_and_docs:
name: Doc Build and Upload
runs-on: ubuntu-22.04
# concurrency:
# # https://github.community/t/concurrecy-not-work-for-push/183068/7
# group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-web-docs
# cancel-in-progress: true
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: sg_docs
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
environment-file: ${{ env.ENV_FILE }}
- name: Build Sphinx Docs
run: |
conda run -n test sphinx-build -b html docs/source docs/build/html
- name: Deploy to Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html # Change this if your output directory is different