Commit 5887fe8f8f

5887fe8f8f23cc36a9505c68570916718ebce9b4

parent: d02be8ffdd

Unsigned

Alicia Sykes <alicia@omg.lol> · 2024-04-07 11:04 UTC

Updates action to sync docs

Layout: unified · split

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