-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (35 loc) · 1.04 KB
/
build_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: Publish Docs
on:
push:
branches: [main]
release:
types: [created]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Publish Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Conda
uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
environment-name: rstools-docs
environment-file: requirements/docs.yml
- name: Sphinx build
shell: bash
run: |
micromamba run -n rstools-docs sphinx-build -b html docs docs/_build/
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ (github.event_name == 'release') || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/_build/