-
-
Notifications
You must be signed in to change notification settings - Fork 40
52 lines (44 loc) · 1.32 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: Deploy
on:
push:
release:
types: [created]
jobs:
job:
name: Build docs
runs-on: ubuntu-latest
env:
TARGET: steam-py/steam-py.github.io
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: ${{ env.TARGET }}
path: steam-py.github.io
- name: Install poetry
run: pipx install poetry && pipx install poethepoet
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "poetry"
- name: Install Dependencies
run: |
poetry install --with docs
- name: Build
if: ${{ github.event_name == 'push' }}
run: |
poetry run python scripts/build_docs_for_pages.py
- name: Build
if: ${{ github.event_name == 'release' }}
run: |
poetry run python scripts/build_docs_for_pages.py --tag=${{ github.event.release.tag_name }}
- name: Push
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
external_repository: ${{ env.TARGET }}
publish_branch: main
publish_dir: steam-py.github.io
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'