-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (38 loc) · 1.17 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
name: Build and publish documentation
on:
push:
branches:
- master
- develop
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: rlespinasse/[email protected]
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache Python packages
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('mkdocs_requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python packages
run: python3 -m pip install -r mkdocs_requirements.txt
- name: Build documentation
run: mkdocs build
- name: Publish documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
destination_dir: ${{ env.GITHUB_REF_SLUG }}