React app on github page not working displaying 404. #76075
Replies: 2 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hello @thomyhabesha
This will generate an optimized production-ready version of your React application.
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: build This deployment script will automatically build and deploy your project to GitHub Pages whenever you push to the
This will add the deployment script to your repository and push it to GitHub.
Replace Please note that deploying to GitHub Pages may take some time to complete and there might be some delay. Once deployed successfully, your React project will be visible at the specified link. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
I created a react app i followed all steps from npm init to npm run deploy. When i run it localy it works fine. But when i deploy on github it shows 404 error. Here is my code https://github.com/thomyhabesha/NurPor
Beta Was this translation helpful? Give feedback.
All reactions