-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (49 loc) · 1.4 KB
/
Copy pathdeploy-dev-docs.yaml
File metadata and controls
57 lines (49 loc) · 1.4 KB
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
name: Deploy Development Docs
on:
push:
branches:
- 'release/**'
paths:
- 'src/**.py'
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set GitHub Actions as Commit Author
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
- name: Checkout main repo
uses: actions/checkout@v4
with:
path: 'main-repo'
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
cd main-repo
uv sync
- name: Checkout dev docs repo
uses: actions/checkout@v4
with:
repository: a-rich/DJ-Tools-dev-docs
path: 'dev-docs-repo'
token: ${{ secrets.DJTOOLS_WORKFLOWS }}
- name: Update and deploy docs
run: |
cd dev-docs-repo/
rm -rf docs && rm -rf src
cp -r ../main-repo/docs . && cp -r ../main-repo/src .
cd ../main-repo
uv run mkdocs gh-deploy --force --config-file ../dev-docs-repo/docs/mkdocs.yml
- name: Commit changes
run: |
cd dev-docs-repo/
git add .
git commit -m "Deploy docs: $GITHUB_SHA"
git push --force