-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (30 loc) · 915 Bytes
/
sync.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
name: Sync
on:
push:
branches: master
schedule:
- cron: '0 * * * *'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.PAT }}
- name: Setup
run: |
git config --global user.name Wenyan Bot
git config --global user.email [email protected]
git remote add upstream https://github.com/wenyan-lang/wenyan.wiki.git
- name: Fetch
run: git fetch upstream
- name: Checkout
run: git checkout origin/master
- name: Merge
run: git merge upstream/master
- name: Branch
run: git branch master
- name: Push
run: |
git push "https://${GITHUB_ACTOR}:${{secrets.PAT}}@github.com/wenyan-lang/wiki.git" HEAD:master
git push "https://${GITHUB_ACTOR}:${{secrets.PAT}}@github.com/wenyan-lang/wenyan.wiki.git" HEAD:master