Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deploy docs as wiki #1860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/deploy-wiki.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Wiki

on:
push:
paths:
- 'kubernetes/docs/**'
branches:
- master

jobs:
deploy-wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install rsync
run: |
sudo apt install rsync grsync
- name: Clone Wiki
run: |
git config --global --add safe.directory "/github/workspace"
git config --global --add safe.directory "/github/workspace/wiki"
git clone https://github.com/kubernetes-client/python.wiki.git wiki
message=$(git log -1 --format=%B)
- name: Copy to wiki repository
run: |
rsync -av --delete kubernetes/docs/ wiki/ --exclude .git
- name: Push wiki
run: |
cd wiki
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "$message"
git push