Skip to content

Commit 364c000

Browse files
authored
[#2316] Update CI/CD Trigger to Allow Automatic Execution for All Relevant Events (#23)
Update CI/CD Trigger Condition to Allow Execution for All Events The current CI/CD trigger condition restricts execution to pushes on the master branch. Update the condition to allow the pipeline to run automatically for all relevant events.
1 parent 07e8d6e commit 364c000

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

.github/workflows/main.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
push:
66
branches:
77
- master
8-
# For scheduled deployment with Cron Jobs.
9-
## Examples of cron schedule expressions:
10-
### '0 * * * *': hourly
11-
### '0 0 * * *': daily
12-
### '0 0 1 * *': monthly
13-
# schedule:
14-
# - cron: '0 0 * * *'
8+
# For scheduled deployment with Cron Jobs.
9+
## Examples of cron schedule expressions:
10+
### '0 * * * *': hourly
11+
### '0 0 * * *': daily
12+
### '0 0 1 * *': monthly
13+
# schedule:
14+
## - cron: '0 0 * * *'
1515

1616
jobs:
1717
build:
@@ -35,12 +35,32 @@ jobs:
3535
echo "VITE_BASE_DIR: $VITE_BASE_DIR"
3636
./run.sh
3737
38-
- name: Deploy GitHub pages
39-
if : github.event_name == 'push' && github.ref == 'refs/heads/master'
40-
uses: peaceiris/actions-gh-pages@v3
38+
- name: Upload artifacts
39+
uses: actions/upload-artifact@v4
4140
with:
42-
github_token: ${{ secrets.GITHUB_TOKEN }}
43-
publish_dir: ./reposense-report
44-
user_name: 'github-actions[bot]'
45-
user_email: 'github-actions[bot]@users.noreply.github.com'
46-
commit_message: Rebuild pages at
41+
name: reposense-report
42+
path: ./reposense-report
43+
44+
45+
deploy:
46+
needs: build
47+
runs-on: ubuntu-24.04
48+
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule'
49+
50+
steps:
51+
- uses: actions/checkout@v3
52+
53+
- name: Download artifacts
54+
uses: actions/download-artifact@v4
55+
with:
56+
name: reposense-report
57+
path: ./reposense-report
58+
59+
- name: Deploy GitHub pages
60+
uses: peaceiris/actions-gh-pages@v3
61+
with:
62+
github_token: ${{ secrets.GITHUB_TOKEN }}
63+
publish_dir: ./reposense-report
64+
user_name: 'github-actions[bot]'
65+
user_email: 'github-actions[bot]@users.noreply.github.com'
66+
commit_message: Rebuild pages at

0 commit comments

Comments
 (0)