Skip to content

Commit 29a0c55

Browse files
Add GHA to upload doc (#385)
1 parent 94d8d6b commit 29a0c55

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

doc.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docs new version release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
Documentation:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: "3.8"
18+
- name: Install dependencies
19+
run: pip install mike mkdocs mkdocs-material
20+
- name: Setup doc deploy
21+
env:
22+
GH_USERNAME: ${{ github.actor }}
23+
run: |
24+
#
25+
git config --global user.email "${GH_USERNAME}@users.noreply.github.com"
26+
git config --global user.name "${GH_USERNAME}"
27+
- name: Release docs website and API reference
28+
run: |
29+
echo ${{ github.event.release.tag_name }}
30+
mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest
31+
mike set-default --push latest
32+
- name: Clean old doc version
33+
run: |
34+
chmod +x .github/ci/doc_to_delete.py
35+
mike list --json | .github/ci/doc_to_delete.py | xargs -n1 mike delete --push

0 commit comments

Comments
 (0)