Skip to content

Commit 2ffbf09

Browse files
authored
Deploy docs to latest and tags (#47)
* Deploy docs to latest and tags * Fix syntax error
1 parent 3734521 commit 2ffbf09

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Build and Deploy Documentation
1+
name: Build and Deploy Documentation to Latest
2+
env:
3+
DOCS_VERSION: latest
24

35
on:
46
push:
57
branches:
6-
- v3.0-rc
8+
- main
79

810
jobs:
911
deploy-docs:

.github/workflows/docs-tag.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Deploy Documentation to Tags
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
deploy-docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
- name: Get release
15+
id: get_release
16+
uses: bruceadams/get-release@v1.3.2
17+
env:
18+
GITHUB_TOKEN: ${{ github.token }}
19+
- name: Build docs
20+
uses: C2SM/sphinx-action@sphinx-latest
21+
with:
22+
pre-build-command: "pip install sphinx_rtd_theme && pip install sphinx-copybutton"
23+
build-command: "sphinx-build -b html . _build"
24+
docs-folder: "docs/"
25+
- uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./docs/_build
29+
destination_dir: ${{ steps.get_release.outputs.tag_name }}
30+
allow_empty_commit: true

0 commit comments

Comments
 (0)