Commit 5887fe8f8f
Unsigned
Layout: unified · split
.github/workflows/sync-docs-branch.yml +20 −20
| @@ -3,31 +3,31 @@ | ||
| 3 | 3 | |
| 4 | 4 | name: 🔄 Sync main to Website |
| 5 | 5 | on: |
| 6 | # push: | |
| 7 | # branches: | |
| 8 | # - main | |
| 9 | 6 | workflow_dispatch: # Manual dispatch |
| 10 | 7 | schedule: |
| 11 | 8 | - cron: '0 5 * * 6' # Every Saturday morning. |
| 12 | 9 | |
| 13 | 10 | jobs: |
| 14 | sync-branches: | |
| 11 | copy-readme: | |
| 15 | 12 | runs-on: ubuntu-latest |
| 16 | name: Syncing branches | |
| 17 | 13 | steps: |
| 18 | - name: Checkout | |
| 19 | uses: actions/checkout@v2 | |
| 20 | - name: Set up Node | |
| 21 | uses: actions/setup-node@v1 | |
| 14 | - name: Check out repo | |
| 15 | uses: actions/checkout@v3 | |
| 22 | 16 | with: |
| 23 | node-version: 12 | |
| 24 | - name: Opening pull request | |
| 25 | id: pull | |
| 26 | uses: tretuna/sync-branches@1.4.0 | |
| 27 | with: | |
| 28 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
| 29 | FROM_BRANCH: main | |
| 30 | TO_BRANCH: gh-pages | |
| 31 | PULL_REQUEST_TITLE: '[AUTO] Update docs site' | |
| 32 | PULL_REQUEST_BODY: | | |
| 33 | Merging main into gh-pages, to be deployed to [awesome-privacy.xyz](https://awesome-privacy.xyz/). | |
| 17 | fetch-depth: 0 | |
| 18 | ||
| 19 | - name: Configure git | |
| 20 | run: | | |
| 21 | git config --global user.email "alicia-gh-bot@mail.as93.net" | |
| 22 | git config --global user.name "Liss-Bot" | |
| 23 | ||
| 24 | - name: Copy README.md to gh-pages | |
| 25 | run: | | |
| 26 | git fetch | |
| 27 | git checkout gh-pages | |
| 28 | git checkout main -- .github/README.md | |
| 29 | mv .github/README.md README.md | |
| 30 | git add README.md | |
| 31 | git commit -m "Update README.md from main" | |
| 32 | git push origin gh-pages | |
| 33 | ||