-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.38 KB
/
Copy pathdocs.yml
File metadata and controls
53 lines (48 loc) · 1.38 KB
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: Docs
on:
push:
branches: [main, feat/add_docs]
pull_request:
permissions:
contents: read
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
# setuptools-scm needs the full history/tags to derive the version.
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install doc dependencies
run: pip install -e '.[doc]'
- name: Build HTML docs
run: make -C docs html
- name: Disable Jekyll processing
# Ensures Pages serves Sphinx's underscore-prefixed dirs (_static, _sources).
run: touch docs/_build/html/.nojekyll
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: docs/_build/html
deploy:
# Publish from the default branch (and feat/add_docs for pre-merge preview).
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feat/add_docs'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5