I have followed the instruction of Vue official website: https://cli.vuejs.org/guide/deployment.html#github-pages
And here are my vue.config.js
file and deploy.sh
file
module.exports = {
publicPath:
process.env.NODE_ENV === "production" ? "/my-project/" : "/",
};
deploy.sh
#!/usr/bin/env sh
# abort on errors
set -e
# build
npm run build
# navigate into the build output directory
cd dist
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:myUserName/my-project.git main:gh-pages
cd -
I have run sh deploy.sh
in my git bash, and have a branch called gh-pages
. But when I used gh-pages
to deploy my website, it render README.md content. How can I solve this problem and render the page I have made?