Skip to content

Commit

Permalink
Add an action to sync the wiki repos
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Nov 12, 2019
1 parent dbca772 commit 9927788
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Based on https://www.growingwiththeweb.com/2016/07/enabling-pull-requests-on-github-wikis.html
name: Sync to Dot Wiki
on:
push:
branches: [master]

jobs:
sync:
runs-on: ubuntu-latest
steps:
- run: |
# Setup Git
git config user.name "typescript-bot"
git config user.email "[email protected]"
# Remove the un-auth'd origin
git remote remove origin
# Switch to authed remotes for both the - and the .
git remote add origin https://[email protected]/microsoft/TypeScript-wiki.git > /dev/null 2>&1
git remote add upstream https://[email protected]/microsoft/TypeScript.wiki.git > /dev/null 2>&1
git fetch origin
git fetch upstream
# Merge them all together
git merge upstream/master --no-edit
# Push them both
git push origin HEAD:master > /dev/null 2>&1
git push upstream HEAD:master > /dev/null 2>&1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9927788

Please sign in to comment.