Skip to content

Commit 5c8091f

Browse files
committed
Add rebuild reason
1 parent b40b6c4 commit 5c8091f

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
branches:
66
- main
77
schedule:
8-
- cron: '0 0 * * 0'
8+
- cron: "0 0 * * 0"
99
repository_dispatch:
1010
types: [feed-update-detected]
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515

1616
strategy:
1717
matrix:
@@ -28,10 +28,28 @@ jobs:
2828
- name: Install dependencies & build
2929
run: |
3030
npm ci
31-
npm run build
31+
npm run build
3232
33-
- name: Deploy
33+
- name: Push Deploy
34+
if: ${{ github.event_name == 'push' }}
3435
uses: peaceiris/actions-gh-pages@v3
3536
with:
3637
publish_dir: ./_site
3738
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
commit_message: "Rebuild on Push"
40+
41+
- name: Scheduled Deploy
42+
if: ${{ github.event_name == 'schedule' }}
43+
uses: peaceiris/actions-gh-pages@v3
44+
with:
45+
publish_dir: ./_site
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
commit_message: "Scheduled Rebuild"
48+
49+
- name: Triggered Deploy
50+
if: ${{ github.event_name == 'repository_dispatch' }}
51+
uses: peaceiris/actions-gh-pages@v3
52+
with:
53+
publish_dir: ./_site
54+
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
commit_message: "Triggered Rebuild: ${{ github.event.client_payload.reason }}"

0 commit comments

Comments
 (0)