-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.19 KB
/
poetry_sphinx_docs_to_gh_pages.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
name: "Build and Publish Docs to GitHub Pages"
on:
push:
paths:
- 'examples/*.py'
- 'docs/**'
- 'README.md'
pull_request:
paths:
- 'docs/**'
- 'examples/*.py'
- 'README.md'
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
if: github.ref_protected == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v1
- name: Set up Python
uses: actions/setup-python@v4
- name: Install poetry
run: |
pip install poetry==1.5.0
- name: Configure poetry
run: |
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
poetry install --all-extras --no-interaction
- name: Sphinx build
run: |
poetry run sphinx-build docs/source _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true