forked from microsoft/TypeScript-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 1.04 KB
/
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
# Based on https://www.growingwiththeweb.com/2016/07/enabling-pull-requests-on-github-wikis.html
name: Sync Two Wiki Repos
on:
push:
branches: [master]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
# Setup Git
- run: git config user.name "typescript-bot"
- run: git config user.email "[email protected]"
# Add the authed remotes for .
- run: git remote add upstream https://[email protected]/microsoft/TypeScript.wiki.git > /dev/null 2>&1
env:
GITHUB_TOKEN: ${{ secrets.TS_BOT_TOKEN }}
# Update search links from the origin repo before pushing to the upstream
- run: git clone --depth 1 https://github.com/microsoft/TypeScript.git TypeScript
- run: npm i
- run: node scripts/convertRelativeLinksToHardcoded.js "**/*.md" --write
- run: rm -rf TypeScript
- run: git add .
- run: git commit --amend --no-edit
# Push to the auth'd branch
- run: git push upstream HEAD:master -f > /dev/null 2>&1