-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.72 KB
/
sync-docs.yml
File metadata and controls
56 lines (46 loc) · 1.72 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
name: Build and Deploy Documentation
on:
push:
branches:
- main
jobs:
build-and-deploy-docs:
runs-on: macos-latest
steps:
- name: Checkout voxkit-desktop repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Configure Git for private repos
run: |
git config --global url."https://${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Generate pdoc documentation
run: |
uv run --group docs pdoc -o ./docs_output src/voxkit
- name: Checkout voxkit-web repository
uses: actions/checkout@v4
with:
repository: BrainBehaviorAnalyticsLab/voxkit-web
token: ${{ secrets.PRIVATE_REPO_TOKEN }}
path: voxkit-web
- name: Copy documentation to voxkit-web
run: |
# Create the public/docs directory if it doesn't exist
mkdir -p voxkit-web/public/docs
# Remove old docs and copy new ones
rm -rf voxkit-web/public/docs/*
cp -r ./docs_output/* voxkit-web/public/docs/
- name: Commit and push to voxkit-web
run: |
cd voxkit-web
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add public/docs
git commit -m "sync: update documentation from voxkit-desktop (commit: ${{ github.sha }})" || echo "No changes to commit"
git push origin main