Fix CI: Auto-detect web/ changes for website build & deploy [web]
- Build website when files in web/ directory are modified - Deploy website on workflow_dispatch without requiring [web] tag - Keep backward compatibility with [web] commit message trigger
This commit is contained in:
@@ -123,7 +123,10 @@ jobs:
|
||||
web-build:
|
||||
name: 🌐 Build Website
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.head_commit.message, '[web]') || github.event_name == 'workflow_dispatch'
|
||||
if: |
|
||||
contains(github.event.head_commit.message, '[web]') ||
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'push' && contains(join(github.event.commits.*.modified, ','), 'web/'))
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -154,7 +157,11 @@ jobs:
|
||||
name: 🚀 Deploy Website
|
||||
runs-on: ubuntu-latest
|
||||
needs: [python-test, web-build]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[web]')
|
||||
if: |
|
||||
github.ref == 'refs/heads/main' &&
|
||||
(contains(github.event.head_commit.message, '[web]') ||
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'push' && contains(join(github.event.commits.*.modified, ','), 'web/')))
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user