Deploy Vue App in Github Pages
Created On:
Reference
Deploy to Github Pages like a pro with Github Actions
Deploy Vue App in GitHub Pages
Create vue.config.js in your project root directory and add publicPath: ‘/your-repos-name
Create a scripts folder and add deploy.js, add following scripts
Open package.json and add “execa”: “latest” in devDependecies
Append “gh-pages-deploy”: “node scripts/deploy.js” in scripts section, run npm install to install added dependencies
Run npm run gh-pages-deploy to start the deployment
If run into your node_modules files is broken, run rm -rf node_modules and npm cache clean —force, it will delete entire node_modules files in your project
Run npm install to reinstall required dependencies of your project