Skip to content

Commit 3b92ed5

Browse files
authored
Merge pull request #2524 from pyth-network/cprussin/dont-build-vercel-stuff
Only build stuff that requires Vercel env to build on Vercel
2 parents 337d9c1 + 49e88fc commit 3b92ed5

File tree

13 files changed

+33
-12
lines changed

13 files changed

+33
-12
lines changed

.github/workflows/ci-turbo-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- name: Cache for Turbo
3434
uses: rharkor/caching-for-turbo@v1.5
3535
- name: Build
36-
run: pnpm build:ci
36+
run: pnpm run turbo build

.github/workflows/publish-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ jobs:
2626
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
2727
env:
2828
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29-
- run: pnpm build:ci
29+
- run: pnpm run turbo build
3030
- run: pnpm run publish

apps/api-reference/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"node": "22"
88
},
99
"scripts": {
10-
"build": "next build",
10+
"build:vercel": "next build",
1111
"fix:format": "prettier --write .",
1212
"fix:lint": "eslint --fix . --max-warnings 0",
1313
"pull:env": "[ $CI ] || VERCEL_ORG_ID=team_BKQrg3JJFLxZyTqpuYtIY0rj VERCEL_PROJECT_ID=prj_gbljYVzp0m5EpCuOF6nZpM4WMFM6 vercel env pull",

apps/api-reference/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://turbo.build/schema.json",
33
"extends": ["//"],
44
"tasks": {
5-
"build": {
5+
"build:vercel": {
66
"env": [
77
"WALLETCONNECT_PROJECT_ID",
88
"AMPLITUDE_API_KEY",

apps/api-reference/vercel.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "../../vercel-ignore.sh"
3+
"ignoreCommand": "../../vercel-ignore.sh",
4+
"buildCommand": "turbo run build:vercel --filter @pythnetwork/api-reference"
45
}

apps/insights/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"node": "22"
88
},
99
"scripts": {
10-
"build": "next build",
10+
"build:vercel": "next build",
1111
"fix:format": "prettier --write .",
1212
"fix:lint:eslint": "eslint --fix .",
1313
"fix:lint:stylelint": "stylelint --fix 'src/**/*.scss'",

apps/insights/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://turbo.build/schema.json",
33
"extends": ["//"],
44
"tasks": {
5-
"build": {
5+
"build:vercel": {
66
"env": [
77
"VERCEL_ENV",
88
"GOOGLE_ANALYTICS_ID",

apps/insights/vercel.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "../../vercel-ignore.sh"
3+
"ignoreCommand": "../../vercel-ignore.sh",
4+
"buildCommand": "turbo run build:vercel --filter @pythnetwork/insights"
45
}

apps/staking/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"node": "22"
88
},
99
"scripts": {
10-
"build": "next build",
10+
"build:vercel": "next build",
1111
"fix:format": "prettier --write .",
1212
"fix:lint": "eslint --fix . --max-warnings 0",
1313
"pull:env": "[ $CI ] || VERCEL_ORG_ID=team_BKQrg3JJFLxZyTqpuYtIY0rj VERCEL_PROJECT_ID=prj_3TIYzlYYncZx7wRtfmzG2YUsNzKp vercel env pull",

apps/staking/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://turbo.build/schema.json",
33
"extends": ["//"],
44
"tasks": {
5-
"build": {
5+
"build:vercel": {
66
"env": [
77
"IP_ALLOWLIST",
88
"GOVERNANCE_ONLY_REGIONS",

apps/staking/vercel.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "../../vercel-ignore.sh"
3+
"ignoreCommand": "../../vercel-ignore.sh",
4+
"buildCommand": "turbo run build:vercel --filter @pythnetwork/staking"
45
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"pnpm": "^9.15.3"
88
},
99
"scripts": {
10-
"build:ci": "turbo build --filter=!./apps/api-reference --filter=!./apps/insights --filter=!./apps/staking",
1110
"fix:format": "prettier --write .",
1211
"install:modules": "[ $CI ] && true || pnpm install",
1312
"publish": "lerna publish from-package --no-private --no-git-tag-version --yes",

turbo.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,25 @@
9696
],
9797
"outputs": ["dist/esm/**"]
9898
},
99+
"build:vercel": {
100+
"dependsOn": [
101+
"//#install:modules",
102+
"pull:env",
103+
"^build",
104+
"build:cjs",
105+
"build:esm"
106+
],
107+
"inputs": [
108+
"$TURBO_DEFAULT$",
109+
"!README.md",
110+
"!**/*.test.*",
111+
"!jest.config.js",
112+
"!eslint.config.js",
113+
"!prettier.config.js",
114+
"!vercel.json"
115+
],
116+
"outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"]
117+
},
99118
"fix": {
100119
"dependsOn": ["fix:lint", "fix:format"],
101120
"cache": false

0 commit comments

Comments
 (0)