Skip to content

Add netlify auto deploy #1

Add netlify auto deploy

Add netlify auto deploy #1

Workflow file for this run

name: Deploy to Netlify
on:
push:
branches:
- main
paths:
- "frontend/**" # Only trigger when files in the frontend folder are changed
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
cache: "yarn"
- name: Install dependencies and build
working-directory: frontend
run: |
yarn install
yarn build
- name: Deploy to Netlify
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
run: |
npm install -g netlify-cli
netlify deploy --prod --dir=frontend/dist --site=$NETLIFY_SITE_ID