updated deploy script
All checks were successful
Deploy to Vercel / deploy (push) Successful in 3m24s
All checks were successful
Deploy to Vercel / deploy (push) Successful in 3m24s
This commit is contained in:
@@ -3,6 +3,8 @@ name: Deploy to Vercel
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@@ -10,31 +12,36 @@ jobs:
|
||||
env:
|
||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
version: 10
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
- name: Enable pnpm via corepack
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare pnpm@10 --activate
|
||||
|
||||
- name: Resolve pnpm store path
|
||||
id: pnpm-store
|
||||
run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache pnpm store
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
path: ${{ steps.pnpm-store.outputs.path }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: pnpm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile --prefer-offline
|
||||
|
||||
- name: Type check
|
||||
run: pnpm exec tsc --noEmit
|
||||
|
||||
- name: Debug
|
||||
- name: Verify Vercel credentials
|
||||
run: |
|
||||
echo "PROJECT_ID len: ${#VERCEL_PROJECT_ID}"
|
||||
echo "PROJECT_ID first chars: ${VERCEL_PROJECT_ID:0:8}"
|
||||
[ -n "$VERCEL_TOKEN" ] && [ -n "$VERCEL_ORG_ID" ] && [ -n "$VERCEL_PROJECT_ID" ] || {
|
||||
echo "::error::One or more Vercel secrets are missing"; exit 1
|
||||
}
|
||||
|
||||
- name: Deploy to Vercel
|
||||
run: npx vercel deploy --prod --yes --token=${{ secrets.VERCEL_TOKEN }}
|
||||
- name: Deploy
|
||||
run: npx vercel deploy --prod --yes
|
||||
Reference in New Issue
Block a user