# Roughly based on # https://www.growingwiththeweb.com/2016/07/enabling-pull-requests-on-github-wikis.html name: Sync Two Wiki Repos on: push: {branches: [main]} schedule: [{cron: "7 0 * * 1,3"}] # https://crontab.guru/#7_0_*_*_1,3 workflow_dispatch: # on request jobs: sync: runs-on: ubuntu-latest steps: - name: Get repo name run: R=${GITHUB_REPOSITORY%?wiki}; echo "BASENAME=${R##*/}" >> $GITHUB_ENV - name: Checkout ${{ env.BASENAME }}-wiki uses: actions/checkout@v4 with: repository: "${{ GITHUB.repository_owner }}/${{ env.BASENAME }}-wiki" token: ${{ secrets.TS_BOT_TOKEN }} fetch-depth: 0 - name: Run sync run: ./.github/workflows/sync env: PUSHER: typescript-bot AUTH: ${{ secrets.TS_BOT_TOKEN }}