File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ # 🧠 Thought process:
2+ # This workflow builds and deploys the website and CV.
3+ # - On push to main: build only, no deploy
4+ # - On release tag: build (if artifact is not present) and deploy both
5+ # - Using composite action to avoid code duplication
16name : Build and Deploy
27
38on :
@@ -15,7 +20,10 @@ permissions:
1520
1621jobs :
1722 build-web :
18- if : github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main') || github.event_name == 'workflow_dispatch'
23+ if : >
24+ (github.event_name == 'release' && github.event.action == 'created' ) ||
25+ (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main')) ||
26+ (github.event_name == 'workflow_dispatch')
1927 runs-on : ubuntu-latest
2028 outputs :
2129 neovim-lines : ${{ steps.lines.outputs.count }}
5260 path : ./dist/
5361
5462 build-cv :
55- if : github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main') || github.event_name == 'workflow_dispatch'
56- needs : build-web
63+ if : >
64+ (github.event_name == 'release' && github.event.action == 'created' ) ||
65+ (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main')) ||
66+ (github.event_name == 'workflow_dispatch')
67+ needs : build-web # leverage pnpm cache reuse
5768 runs-on : ubuntu-latest
5869 env :
5970 GITHUB_RUN_NUMBER : ${{ github.run_number }}
You can’t perform that action at this time.
0 commit comments