-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.42 KB
/
update-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
55
56
57
58
59
name: Update docs
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
ref: docs
fetch-tags: true
token: ${{ secrets.RELEASE_PAT_TOKEN }} # Needed to trigger other actions
- name: Configure git
run: |
git config --global user.name 'BotReleaser'
git config --global user.email '[email protected]'
- name: Merge latest code
run: |
git fetch --prune
git merge ${{ github.ref_name }}
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install deps
run: make setup
- name: Build the docs
run: make doc
- name: Adding built docs
run: |
git add -f ./docs
git commit -m "Docs for latest tag" --allow-empty
- name: Push to docs
run: |
git push origin docs