Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ake123 committed Jan 16, 2024
1 parent cb49f5d commit 1d1da36
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy React App to GitHub Pages
name: Build and Deploy React App to GitHub Pages

on:
push:
Expand All @@ -21,19 +21,22 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build React App
- name: Build HTML files from JSX
run: |
cd src/components
npm run build
mv build/* ../..
npx babel --out-dir build src/components --extensions .jsx
env:
CI: true

- name: Deploy to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git checkout --orphan gh-pages
git --work-tree build add --all
git --work-tree build commit -m "Deploy to GitHub Pages"
git rm -rf .
mv build/* .
git add .
git commit -m "Deploy to GitHub Pages"
git push origin HEAD:gh-pages --force
env:
CI: true

0 comments on commit 1d1da36

Please sign in to comment.