-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.31 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
53
54
# build docs from docstrings and markdown-file in folder docs
# publish them as github pages
#
#note for myself
#
# Do not forget to set git branch `gh-pages` as source for github pages.
# This branch auto-updated by `mkdocs gh-deploy`
#
name: docs
on:
push:
branches:
- main
- master
permissions:
contents: write
jobs:
deploy:
env:
PRIMARY_PYTHON_VERSION: '3.12'
runs-on: ubuntu-latest
concurrency:
group: github-pages
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Checkout gh-pages to backup Allure test reports
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PRIMARY_PYTHON_VERSION }}
- uses: andgineer/uv-venv@v1
- run: |
uv pip install ghp-import -r requirements.dev.txt --python=${{ env.PRIMARY_PYTHON_VERSION }}
- run: |
./scripts/build-docs.sh
ghp-import --no-jekyll --push --force site
- name: Restore Allure test reports folder
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: gh-pages/builds
destination_dir: builds