Skip to content

Update deploy.yml

Update deploy.yml #3

Workflow file for this run

name: Deploy to GitHub Pages
# Trigger the workflow on push to main branch or on pull request to main
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
# Install dependencies
- name: Install dependencies
run: npm install
# Build the React project
- name: Build project
run: npm run build
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
run: npm run deploy
env:
CI: false
# Optional: Notify completion
- name: Deployment Success
run: echo "Deployment successful!"