From 9742e7adb904110683a161f8519d751f4cdc944d Mon Sep 17 00:00:00 2001 From: Rishit Dagli Date: Tue, 19 Jul 2022 07:14:19 +0000 Subject: [PATCH] Deploy docs as wiki --- .github/workflows/deploy-wiki.yaml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/deploy-wiki.yaml diff --git a/.github/workflows/deploy-wiki.yaml b/.github/workflows/deploy-wiki.yaml new file mode 100644 index 0000000000..52914b959d --- /dev/null +++ b/.github/workflows/deploy-wiki.yaml @@ -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 github-actions@github.com + git add . + git commit -m "$message" + git push + \ No newline at end of file