Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial upload for vercel.com deployment ci/cd #67

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploying to Production (Vercel.com)

on:
push:
branches:
- master
pull_request:
branches:
- development
types:
- closed

jobs:
deploy:
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: Set up Node.js Environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install project dependencies
run: npm ci

- 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