Skip to content

Commit

Permalink
ci: action to deploy to vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
Waver-Velvet committed Jun 4, 2024
1 parent 9e8c631 commit 762eae0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Deploy to Vercel action is created because the project is under an organization.
# Vercel itself cannot link a project under an organization with hobby plan.

name: Deploy Vercel
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/checkout@v2

- run: |
pnpm install
pnpm dlx vercel pull --yes --token=${VERCEL_TOKEN}
pnpm dlx vercel build --prod
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- uses: amondnet/vercel-action@v25 #deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-args: '--prod --prebuilt' #Optional
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} #Required

0 comments on commit 762eae0

Please sign in to comment.