-
Notifications
You must be signed in to change notification settings - Fork 1.5k
60 lines (51 loc) · 1.81 KB
/
documentation.yml
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
59
60
name: Build and publish HTML documentation website
on:
push:
branches: [ 'docs-v**' ]
paths: ['docs/**', '.github/**']
jobs:
make-html:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get release name and channel
id: release-info
shell: python
run: |
channel = "master"
version = "${{ github.ref }}"
assert version.startswith("refs/heads/docs-v0.5.")
version = version[len("refs/heads/docs-v"):]
print("::set-output name=channel::" + channel)
print("::set-output name=version::" + version)
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-sphinx-sphinx-tabs-sphinx-design-sphinx_copybutton-sphinx_panels-sphinx_rtd_theme
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Python dependencies
run: pip install sphinx sphinx-tabs sphinx-design sphinx_copybutton sphinx_panels sphinx_rtd_theme myst_parser
- name: Build HTML docs
run: |
cd docs
make html
- name: Upload docs
uses: ./.github/actions/upload-release
with:
release_type: docs
version: ${{ steps.release-info.outputs.version }}
src_dir: docs/_build/html
do_access_key: ${{ secrets.DIGITALOCEAN_ACCESS_KEY }}
do_secret_key: ${{ secrets.DIGITALOCEAN_SECRET_KEY }}
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}
variant: public
- name: Add version to release channel
uses: ./.github/actions/add-version-to-channel
with:
release_type: docs
channel: ${{ steps.release-info.outputs.channel }}
version: ${{ steps.release-info.outputs.version }}
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}