File tree Expand file tree Collapse file tree 4 files changed +115
-2
lines changed Expand file tree Collapse file tree 4 files changed +115
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Vercel Preview Deployment
2
+
3
+ on :
4
+ push :
5
+ branches-ignore :
6
+ - main
7
+
8
+ jobs :
9
+ deploy-en :
10
+ uses : ./.github/workflows/vercel-deploy.yml
11
+ with :
12
+ environment : preview
13
+ prodFlag : ' '
14
+ secrets :
15
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_EN_ID }}
16
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
17
+ VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
18
+
19
+ deploy-zh-hans :
20
+ uses : ./.github/workflows/vercel-deploy.yml
21
+ with :
22
+ environment : preview
23
+ prodFlag : ' '
24
+ secrets :
25
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ZH_HANS_ID }}
26
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
27
+ VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Vercel Production Deployment
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ deploy-en :
10
+ uses : ./.github/workflows/vercel-deploy.yml
11
+ with :
12
+ environment : production
13
+ prodFlag : --prod
14
+ secrets :
15
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_EN_ID }}
16
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
17
+ VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
18
+
19
+ deploy-zh-hans :
20
+ uses : ./.github/workflows/vercel-deploy.yml
21
+ with :
22
+ environment : production
23
+ prodFlag : --prod
24
+ secrets :
25
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ZH_HANS_ID }}
26
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
27
+ VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Vercel Deploy
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ environment :
7
+ description : " Vercel environment (production or preview)"
8
+ required : true
9
+ type : string
10
+ prodFlag :
11
+ description : " Set to --prod for production deploys, empty for preview"
12
+ required : false
13
+ type : string
14
+ default : " "
15
+ secrets :
16
+ VERCEL_PROJECT_ID :
17
+ required : true
18
+ VERCEL_ORG_ID :
19
+ required : true
20
+ VERCEL_TOKEN :
21
+ required : true
22
+
23
+ jobs :
24
+ deploy :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - name : Checkout code
28
+ uses : actions/checkout@v3
29
+ with :
30
+ fetch-depth : 1
31
+
32
+ - name : Setup pnpm
33
+
34
+
35
+ - name : Setup Node
36
+
37
+ with :
38
+ node-version-file : .nvmrc
39
+
40
+ - name : Install Vercel CLI
41
+ run : npm install --global vercel
42
+
43
+ - name : Pull Vercel Environment Information
44
+ run : vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}
45
+ env :
46
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
47
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
48
+
49
+ - name : Build Project Artifacts
50
+ run : vercel build ${{ inputs.prodFlag }} --token=${{ secrets.VERCEL_TOKEN }}
51
+ env :
52
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
53
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
54
+
55
+ - name : Deploy Project Artifacts
56
+ run : vercel deploy --prebuilt ${{ inputs.prodFlag }} --token=${{ secrets.VERCEL_TOKEN }}
57
+ env :
58
+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
59
+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ yarn-error.log*
26
26
# others
27
27
.env * .local
28
28
.env
29
- .vercel
29
+ .vercel *
30
30
next-env.d.ts
31
31
32
32
# content
33
- content2
33
+ content2
You can’t perform that action at this time.
0 commit comments