Skip to content

Commit 68029a8

Browse files
committed
DOC: deploy documentation using Github Pages
1 parent e8ee865 commit 68029a8

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/docs.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ name: docs
66

77
on:
88
push:
9+
tags:
10+
- '[0-9]+.[0-9]+.[0-9]+'
911
pull_request:
1012
branches:
1113
- main
@@ -14,14 +16,36 @@ on:
1416
- docs/**
1517
- CHANGELOG.rst
1618
- README.md
19+
workflow_dispatch:
20+
inputs:
21+
tag:
22+
required: true
1723

1824
jobs:
19-
docs:
25+
26+
build:
2027
runs-on: ubuntu-latest
2128
steps:
2229
- uses: actions/setup-python@v4
2330
with:
2431
python-version: '3.11'
2532
- uses: actions/checkout@v3
33+
with:
34+
ref: ${{ github.event.push.tag || github.event.inputs.tag }}
2635
- run: python -m pip install .[docs]
2736
- run: python -m sphinx docs/ build/docs/
37+
- uses: actions/upload-pages-artifact@v2
38+
with:
39+
path: build/docs/
40+
41+
deploy:
42+
needs: build
43+
permissions:
44+
pages: write
45+
id-token: write
46+
environment:
47+
name: github-pages
48+
runs-on: ubuntu-latest
49+
if: ${{ github.event.push.tag || github.event.inputs.tag }}
50+
steps:
51+
- uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)