Skip to content

Commit 0d9e92b

Browse files
committed
feat: add deploy-website job to release workflow and update website workflow for manual triggers
1 parent b9ccb2e commit 0d9e92b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,3 +599,11 @@ jobs:
599599
fi
600600
env:
601601
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
602+
603+
deploy-website:
604+
name: Deploy Website
605+
needs: [release]
606+
uses: ./.github/workflows/website.yml
607+
permissions:
608+
contents: write
609+
pull-requests: write

.github/workflows/website.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Website Deploy
22

33
on:
44
workflow_dispatch: # Allow manual trigger
5+
workflow_call: # Allow being called from release workflow
56
push:
67
branches:
78
- main
@@ -49,7 +50,7 @@ jobs:
4950
run: pnpm install --frozen-lockfile
5051

5152
- name: Build website (Production)
52-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
53+
if: github.event_name != 'pull_request'
5354
working-directory: web
5455
run: pnpm build
5556

@@ -65,7 +66,7 @@ jobs:
6566
pnpm build
6667
6768
- name: Upload production artifact
68-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
69+
if: github.event_name != 'pull_request'
6970
uses: actions/upload-artifact@v4
7071
with:
7172
name: production-build
@@ -80,9 +81,9 @@ jobs:
8081
path: web/dist
8182
retention-days: 7
8283

83-
# Production deploy - only on main branch push
84+
# Production deploy - on main branch push, workflow_call, or workflow_dispatch
8485
deploy-production:
85-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
86+
if: github.event_name != 'pull_request'
8687
needs: build
8788
runs-on: ubuntu-latest
8889
steps:

0 commit comments

Comments
 (0)