-
-
Notifications
You must be signed in to change notification settings - Fork 55
57 lines (48 loc) · 1.36 KB
/
publish-doc.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
name: Documentation 📚
on:
push:
branches:
- master
paths:
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflow/publish-doc.yml'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up NodeJS (for search index prebuilding)
uses: actions/setup-node@v3
with:
node-version: '12'
- name: Cache project dependencies (pip)
uses: actions/cache@v3.3.1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/doc.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements/doc.txt
- name: Copy CHANGELOG.md and CONTRIBUTING.md
run: |
cp CHANGELOG.md docs/
cp CONTRIBUTING.md docs/
- name: Deploy to Github Pages
run: |
git config --global user.name "${{ secrets.BOT_NAME }}"
git config --global user.email "${{ secrets.BOT_MAIL }}"
mkdocs gh-deploy --clean --force --verbose