Skip to content

Commit

Permalink
feat: implement yaml script to deploy react app
Browse files Browse the repository at this point in the history
  • Loading branch information
0xabdulkhaliq committed May 15, 2024
1 parent 22a7d03 commit 583dd15
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-react-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy React App

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm install

- name: Build React app
run: npm run build

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
clean: true
single-commit: true
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 583dd15

Please sign in to comment.