-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (55 loc) · 1.89 KB
/
documentation.yml
File metadata and controls
58 lines (55 loc) · 1.89 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
54
55
56
57
58
# Source: https://coderefinery.github.io/documentation/gh_workflow/
# and https://glebbahmutov.com/blog/versioned-doc-pages/
# Publish documentation to: https://devoinc.github.io/python-mlmodelmanager-client/
name: Docs
# After bumping version (when closed Pull Requests to main) and tests are passed
on:
workflow_run:
workflows: ["Publish Python Package to Pypi"]
types:
- completed
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.0
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'poetry'
- name: Save version
run: |
POETRY_VERSION=$(poetry version -s)
echo "RELEASE_VERSION=S{POETRY_VERSION}"
echo "RELEASE_VERSION=${POETRY_VERSION}" >> $GITHUB_ENV
- name: Install dependencies
run: |
poetry install
- name: Sphinx build
run: |
poetry run sphinx-build docs/source _build
- name: Deploy version 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CICD_TOKEN }}
# deploy the current public folder
# to <base url>/v<x.y.z> version subfolder
publish_dir: ./_build
destination_dir: v${{ env.RELEASE_VERSION }}
- name: Deploy root 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CICD_TOKEN }}
# deploy the current public folder to <base url>
publish_dir: ./_build
keep_files: true