File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : ci
22
33on :
4- pull_request :
5- types : [opened, synchronize, closed]
4+ push :
5+ branches-ignore :
6+ - master
67
78jobs :
89 build :
4142 - run : pnpm test
4243
4344 deploy-to-development :
44- if : github.event.pull_request.merged == true && github.base_ref == 'master'
4545 runs-on : ubuntu-latest
4646 needs : [build, test]
4747 environment : development
4848 steps :
4949 - run : echo "Deploying to development environment"
50-
51- # deploy-to-production:
52- # fi: github.event.pull_request.merged == true && github.base_ref == 'master' && startsWith(github.head_ref, 'release/')
53- # runs-on: ubuntu-latest
54- # needs: [build, test]
55- # environment: production
56- # steps:
Original file line number Diff line number Diff line change 1+ name : Vercel Preview Deployment
2+
3+ env :
4+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
5+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
6+
7+ on :
8+ push :
9+ branches-ignore :
10+ - master
11+
12+ jobs :
13+ deploy-preview :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : " 18.x"
20+
21+ - name : Install pnpm
22+ uses : pnpm/action-setup@v4
23+
24+ - name : Install Vercel CLI
25+ run : pnpm install -g vercel@latest
26+
27+ - name : Pull Vercel Environment Variables
28+ run : vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
29+
30+ - name : Build Artifact
31+ run : vercel build --token=${{ secrets.VERCEL_TOKEN }}
32+
33+ - name : Deploy Artifact to Vercel
34+ run : vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Vercel Production Deployment
2+
3+ env :
4+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
5+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
6+
7+ on :
8+ push :
9+ branches :
10+ - master
11+
12+ jobs :
13+ deploy-to-production :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : " 18.x"
20+
21+ - name : Install pnpm
22+ uses : pnpm/action-setup@v4
23+
24+ - name : Install Vercel CLI
25+ run : pnpm install -g vercel@latest
26+
27+ - name : Pull Vercel Environment Variables
28+ run : vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
29+
30+ - name : Build Artifact
31+ run : vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
32+
33+ - name : Deploy Artifact to Vercel
34+ run : vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
You can’t perform that action at this time.
0 commit comments