Skip to content

Commit

Permalink
Update build-and-deploy.yml
Browse files Browse the repository at this point in the history
emptied it
  • Loading branch information
CharanMN7 authored Oct 29, 2023
1 parent eaded1b commit ee0ceb5
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1 @@
---
name: Build and Deploy React Website
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Build React app
run: npm run build
- name: Deploy to GitHub Pages
uses: actions/github-script@v6
with:
script: |
# Create the gh-pages branch if it doesn't exist
git checkout -b gh-pages || git checkout gh-pages

# Copy the build files to the gh-pages branch
cp -r build/* .
# Commit and push the changes
git add .
git commit -m "Deploy React website"
git push origin gh-pages
# Return to the main branch
git checkout main

0 comments on commit ee0ceb5

Please sign in to comment.