-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.12 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build
on:
push:
branches-ignore: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
name: Build and Deploy to Vercel Preview
runs-on: ubuntu-latest
environment:
name: preview
url: ${{ steps.deployment.outputs.DEPLOYMENT_URL }}
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ github.actor }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
steps:
- uses: actions/[email protected]
- name: Set up pnpm
uses: pnpm/[email protected]
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version-file: package.json
cache: "pnpm"
- run: pnpm install --global vercel@latest
- run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- run: |
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | \
xargs -I {} echo "DEPLOYMENT_URL={}" >> "${GITHUB_OUTPUT}"
id: deployment