Skip to content

Commit c888fbb

Browse files
committed
Add an action to sync the wiki repos
1 parent dbca772 commit c888fbb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/sync.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Sync to Dot Wiki
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
sync:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: |
11+
git config user.name "typescript-bot"
12+
git config user.email "[email protected]"
13+
git remote remove origin
14+
git remote add origin https://[email protected]/microsoft/TypeScript-wiki.git > /dev/null 2>&1
15+
git remote add upstream https://[email protected]/microsoft/TypeScript.wiki.git > /dev/null 2>&1
16+
git fetch origin
17+
git fetch upstream
18+
git merge upstream/master --no-edit
19+
git push origin HEAD:master > /dev/null 2>&1
20+
git push upstream HEAD:master > /dev/null 2>&1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)