-
Notifications
You must be signed in to change notification settings - Fork 35
46 lines (40 loc) · 1.3 KB
/
sync-wiki2.yaml
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
46
#
# ACCESS_TOKEN - Personal Access Token with "public_repo" permission
# If there is a change to rusefi/rusefi_documentation, this action merges it to rusefi/rusefi/wiki
#
# the opposite merge is implemented as https://github.com/rusefi/rusefi/blob/master/.github/workflows/sync-wiki.yaml
#
name: Sync Wiki2
on:
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
if: ${{ github.actor != 'actions-user' }}
steps:
- name: Check out docs repo
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: rusefi/rusefi.wiki
persist-credentials: false
- name: Merge from rusefi_documentation
run: |
git remote add technical-git https://github.com/rusefi/rusefi_documentation.git
git fetch technical-git
if [ $(git diff technical-git/master | wc -l) -eq 0 ]; then
echo "skip=true" >> $GITHUB_ENV
exit 0
fi
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git merge technical-git/master
- name: Push changes rusefi/rusefi wiki
uses: ad-m/github-push-action@master
if: ${{ env.skip != 'true' }}
with:
repository: rusefi/rusefi.wiki
github_token: ${{ secrets.ACCESS_TOKEN }}
branch: master