Skip to content

Update ci.yml

Update ci.yml #7

Workflow file for this run

permissions:
contents: write
name: React-CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
# Deployment step
- name: Build React app
run: npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # Branch to deploy to
folder: build # Folder to deploy
if: github.ref == 'refs/heads/master' # Conditional deployment