Skip to content

Commit 0553bba

Browse files
authored
Merge pull request #1860 from Rishit-dagli/Rishit-dagli-wiki
Deploy docs as wiki
2 parents 74e8516 + 9742e7a commit 0553bba

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy-wiki.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Wiki
2+
3+
on:
4+
push:
5+
paths:
6+
- 'kubernetes/docs/**'
7+
branches:
8+
- master
9+
10+
jobs:
11+
deploy-wiki:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
- name: Install rsync
18+
run: |
19+
sudo apt install rsync grsync
20+
- name: Clone Wiki
21+
run: |
22+
git config --global --add safe.directory "/github/workspace"
23+
git config --global --add safe.directory "/github/workspace/wiki"
24+
git clone https://github.com/kubernetes-client/python.wiki.git wiki
25+
message=$(git log -1 --format=%B)
26+
- name: Copy to wiki repository
27+
run: |
28+
rsync -av --delete kubernetes/docs/ wiki/ --exclude .git
29+
- name: Push wiki
30+
run: |
31+
cd wiki
32+
git config user.name github-actions
33+
git config user.email [email protected]
34+
git add .
35+
git commit -m "$message"
36+
git push
37+

0 commit comments

Comments
 (0)