.github/workflows/sync-docs-branch.yml

33 lines · 1009 bytes

 1# Action to automatically pull content of main branch into gh-pages
 2# whenever main content is modified. Site will then be auto-deployed
 3
 4name: 🔄 Sync main to Website
 5on:
 6#   push:
 7#     branches:
 8#       - main
 9  workflow_dispatch: # Manual dispatch
10  schedule:
11    - cron: '0 5 * * 6' # Every Saturday morning.
12
13jobs:
14  sync-branches:
15    runs-on: ubuntu-latest
16    name: Syncing branches
17    steps:
18      - name: Checkout
19        uses: actions/checkout@v2
20      - name: Set up Node
21        uses: actions/setup-node@v1
22        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/).