Update deploy.yml #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy React to GitHub Pages | |
on: | |
push: | |
branches: | |
- react_ui # Change this if your default branch is different | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- 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: react_ui # Deployment branch | |
folder: build # React build output folder |