-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (41 loc) · 1003 Bytes
/
docs-publing.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
name: Docs Building & Pushing
on:
push:
branches: [ "docs-source" ]
pull_request:
branches: [ "docs-source" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install -U pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Pull `docs`
run: |
cd site;
git pull;
cd ..;
- name: Clear `docs`
run: |
python clearing.py
- name: Build `docs`
run: |
mkdocs build
- name: Push `docs`
run: |
cd site;
git commit -a -m "Update docs";
git push origin HEAD:docs;
cd ..;