Skip to content

Commit

Permalink
Merge pull request #69 from eksqtr/feature/deployment-vercel
Browse files Browse the repository at this point in the history
Adjustment on vercel deployment cicd
  • Loading branch information
eksqtr authored Sep 2, 2024
2 parents 7b9b885 + 77d0fad commit e927233
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Deploying to Production (Vercel.com)
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_TEAM_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:
Expand All @@ -15,22 +18,17 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master')
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout project source
- uses: actions/checkout@v

- name: Set up Node.js Environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Vercel CLI Latest
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Install project dependencies
run: npm ci
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Build the project
run: npm run build

- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
npx vercel --prod --token=$VERCEL_TOKEN
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit e927233

Please sign in to comment.