-
Notifications
You must be signed in to change notification settings - Fork 2
27 lines (26 loc) · 1001 Bytes
/
wiki-sync.yml
File metadata and controls
27 lines (26 loc) · 1001 Bytes
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
---
name: Sync-to-wiki
on:
push:
branches:
- master
jobs:
wiki-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: reconfigure git and sync with innersourcecommons.org.wiki
env:
GH_API_KEY: ${{ secrets.GH_API_KEY }}
run: |
# adapted from here: https://www.growingwiththeweb.com/2016/07/enabling-pull-requests-on-github-wikis.html
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git remote remove origin
git remote add origin https://$GH_API_KEY@github.com/InnerSourceCommons/innersourcecommons.org-wiki.git > /dev/null 2>&1
git remote add upstream https://$GH_API_KEY@github.com/InnerSourceCommons/innersourcecommons.org.wiki.git > /dev/null 2>&1
git fetch origin
git fetch upstream
git merge upstream/master --no-edit
git push origin HEAD:master
git push upstream HEAD:master