-
-
Notifications
You must be signed in to change notification settings - Fork 390
52 lines (43 loc) · 1.13 KB
/
docs.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
name: Generate & Deploy Docs
on:
push:
tags:
branches:
- 3.x
- 2.x
- 1.x
- 0.x
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Clone Source Repository
uses: actions/checkout@v4
- name: Fetch git tags
run: git fetch --tags origin
- name: Clone Generated Repository
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: fizzadar/docs.pyinfra.com
path: docs/public/
- name: Set up Python
uses: actions/setup-python@v5
- name: Install
run: |
pip install '.[docs]'
pip install 'jinja2<3.1'
- name: Generate documentation
run: scripts/build_public_docs.sh
env:
PYTHONPATH: '.'
- name: Push & Update
run: |
cd docs/public/
if [[ `git status --porcelain` ]]; then
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Docs build $(date -I)"
git push origin HEAD:main
fi