-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 948 Bytes
/
main.yml
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
name: Publish docs to Wiki
on:
push:
paths:
- docs/**
branches:
- main
env:
USER_TOKEN: ${{ secrets.USER_TOKEN }}
USER_NAME: Tuubz
USER_EMAIL: [email protected]
OWNER: ${{ github.event.repository.owner.name }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
jobs:
Publish-Docs-To-Wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare
run: |
mkdir tmp_wiki
cd tmp_wiki
git init
git config user.name $USER_NAME
git config user.email $USER_EMAIL
git pull https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git
- name: Push
run: |
rsync -av --delete docs/ tmp_wiki/ --exclude .git
cd tmp_wiki
git add .
git commit -m "Update Wiki content"
git push -f --set-upstream https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git master