Skip to content

Commit f822f33

Browse files
committed
run pre-deploy in a separate step
1 parent 44fd8fe commit f822f33

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/workflows/cd.deploy.stg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags:
66
- "stg-v*"
7+
branches:
8+
# @TODO-ZM: Remove this
9+
- project-detail
710
workflow_dispatch:
811

912
jobs:
@@ -48,6 +51,8 @@ jobs:
4851
run: npx lerna run bundle:alone --scope @dzcode.io/web
4952
- name: "Sentry Release"
5053
run: npm run generate:sentry-release $DEPLOY_VERSION stage ${{ secrets.SENTRY_AUTH_TOKEN }}
54+
- name: "Pre-deploy"
55+
run: npm run pre-deploy
5156
- name: "Deploy"
5257
run: npm run deploy:stg
5358

.github/workflows/cd.deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
run: npx lerna run bundle:alone --scope @dzcode.io/web
4848
- name: "Sentry Release"
4949
run: npm run generate:sentry-release $DEPLOY_VERSION production ${{ secrets.SENTRY_AUTH_TOKEN }}
50+
- name: "Pre-deploy"
51+
run: npm run pre-deploy
5052
- name: "Deploy"
5153
run: npm run deploy
5254

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"lint:staged": "lerna exec --since HEAD --concurrency 1 --stream -- lint-staged && lint-staged",
7474
"patch-package": "patch-package --patch-dir packages/tooling/patches",
7575
"postinstall": "npm run patch-package && (husky install && husky set .husky/pre-commit \"npm run lint:staged\") || exit 0",
76+
"pre-deploy": "lerna run pre-deploy --parallel",
7677
"prepare": "ts-patch install -s",
7778
"start:dev": "lerna run start:dev --parallel",
7879
"test": "npm run build && npm run test:alone",

web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
"bundle:preview": "rsbuild preview",
7171
"clean": "lerna run clean:alone [email protected]/web --include-dependencies --stream",
7272
"clean:alone": "del dist coverage bundle node_modules/.cache && del ./cloudflare/public",
73-
"deploy": "npm run pre-deploy && cd ./cloudflare && npm install && npm run deploy:prd ",
74-
"deploy:stg": "npm run pre-deploy && cd ./cloudflare && npm install && npm run deploy:stg",
73+
"deploy": "cd ./cloudflare && npm install && npm run deploy:prd ",
74+
"deploy:stg": "cd ./cloudflare && npm install && npm run deploy:stg",
7575
"e2e:dev": "npx wait-on http://localhost:8080/ && npx cypress open",
7676
"generate:bundle-info": "ts-node ../packages/tooling/bundle-info.ts",
7777
"generate:htmls": "npx tsx src/_build/gen-multiple-htmls.ts",

0 commit comments

Comments
 (0)