Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 29338e6

Browse files
authored
ENG-594: Vercel CI (#80)
* Update vercel env vars & CI flow * Update to use env var
1 parent 98492ff commit 29338e6

7 files changed

Lines changed: 67 additions & 15 deletions

File tree

.env.development

Lines changed: 0 additions & 5 deletions
This file was deleted.

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
REACT_APP_API_URL=https://testnet.polybase.xyz
2+
REACT_APP_DOMAIN=127.0.0.1
3+
REACT_APP_STRIPE_KEY=pk_test_51KtuEsLy2l5dJUizqERWHW5XeSzxFyMB77n9YGWFaznMHEtU9uI9oSC6hXIPH1ZuKhZqyBieTzdlznsm7MsdFB5t00vzGufO1Q
4+
# DO NOT USE THIS PRIVATE KEY IN PRODUCTION, BECAUSE OBV EVERYONE CAN SEE IT
5+
PRIVATE_KEY=012720e1ccf409c5b5a5d51671eaad318aaaa45e7b37fe220b28bb7bc2e6619d

.env.production

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Vercel Preview Deployment
2+
3+
env:
4+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5+
VERCEL_PROJECT_ID: prj_P2rIzILBVH8PhisQDAYMp0QFTa95
6+
7+
on:
8+
push:
9+
10+
jobs:
11+
Deploy-Preview:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Install Vercel CLI
17+
run: npm install --global vercel@latest
18+
19+
- name: Pull Vercel Environment Information
20+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
21+
22+
- name: Build Project Artifacts
23+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
24+
25+
- name: Deploy Project Artifacts to Vercel
26+
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Vercel Production Deployment
2+
3+
env:
4+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5+
VERCEL_PROJECT_ID: prj_P2rIzILBVH8PhisQDAYMp0QFTa95
6+
7+
on:
8+
release:
9+
types:
10+
- created
11+
12+
jobs:
13+
Deploy-Production:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Install Vercel CLI
19+
run: npm install --global vercel@latest
20+
21+
- name: Pull Vercel Environment Information
22+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
23+
24+
- name: Build Project Artifacts
25+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
26+
27+
- name: Deploy Project Artifacts to Vercel
28+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
# misc
1515
.DS_Store
16+
.env
1617
.env.local
1718
.env.development.local
1819
.env.test.local

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "explorer",
2+
"name": "@polybase/explorer",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
@@ -8,9 +8,11 @@
88
"test": "react-app-rewired test",
99
"analyze": "source-map-explorer 'build/static/js/*.js'",
1010
"eject": "react-scripts eject",
11-
"load": "ts-node ./schema/load.ts",
12-
"env": "env-cmd --no-override --file ${ENV_PATH:-.env.development}",
13-
"deploy": "SKIP_PREFLIGHT_CHECK=true NODE_ENV=production yarn build && yarn deploy:netlify",
11+
"pull:dev": "vercel env pull --environment development",
12+
"pull:preview": "vercel env pull --environment preview",
13+
"pull:prod": "vercel env pull --environment production",
14+
"load": "ts-node ./scripts/create-schema.ts",
15+
"env": "env-cmd --no-override --file ${ENV_PATH:-.env}",
1416
"fix": "eslint \"./src/**/*.{ts,tsx}\" webpack.config.js --fix"
1517
},
1618
"dependencies": {
@@ -169,4 +171,4 @@
169171
"url": "^0.11.0",
170172
"yarn": "^1.22.19"
171173
}
172-
}
174+
}

0 commit comments

Comments
 (0)