Skip to content

Merge pull request #8 from akirachix/feature/ci-cd #10

Merge pull request #8 from akirachix/feature/ci-cd

Merge pull request #8 from akirachix/feature/ci-cd #10

Workflow file for this run

name: Deploy to Vercel
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
working-directory: tesfa
- name: Run tests
run: npm test
working-directory: tesfa
- name: Build project
run: npm run build
working-directory: tesfa
- name: Deploy to Vercel
if: github.ref == 'refs/heads/main'
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
npx vercel --prod --confirm --token $VERCEL_TOKEN
working-directory: tesfa