I am trying to see my React + Vite's project using github actions but I'm receiving this error: 404 Error Image
This is my repository:
My React's project is on web folder and I put in package.json the "homepage": "github-page/",:
{
"name": "web",
"private": true,
"version": "0.0.0",
"homepage": "github-page/",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
...
}
And, I set in workflow:
May someone help me? Sorry for my English rs
I tried to put cd web
to make my web application work.
name: deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Build web-app
run: |
cd web
npm ci
npm run build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build