-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.21 KB
/
Copy pathsync-docs.yml
File metadata and controls
45 lines (40 loc) · 1.21 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
name: Sync Docs
on:
push:
branches: ["main", "master"]
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"
workflow_dispatch:
jobs:
sync-docs:
name: Sync Docs to phi-website
runs-on: ubuntu-latest
steps:
- name: Checkout Phi Docs
uses: actions/checkout@v4
- name: Checkout phi-website
uses: actions/checkout@v4
with:
repository: 'VoidClancy/phi-website'
token: ${{ secrets.DOCS_SYNC_TOKEN || secrets.GITHUB_TOKEN }}
path: 'phi-website'
- name: Copy docs to phi-website content/docs
run: |
rm -rf phi-website/content/docs
mkdir -p phi-website/content/docs
cp -r docs/* phi-website/content/docs/
- name: Commit and Push Changes to phi-website
run: |
cd phi-website
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add content/docs/
git commit -m "docs: sync documentation from Phi"
git push
else
echo "No documentation changes to sync."
fi