1. Package to dist
yarn build
Copy the code
2. Create a Git repository
Link the dist file to the repository by executing the following command
rm -rf dist yarn build cd dist git init git add . git commit -m "init-first" git branch -M main git remote add origin [email protected]: JinYoMo/comment - webpack - plugin. Git / / SSH address git push - f - u origin mainCopy the code
3. GitHub Pages in Settings of the repository obtains the deployment address
IO/coco-uI-web…
Optimization:
One-click deployment: Add the one-click deployment script deploy.sh
1. Bash is integrated with vscode
Json To use this command, run the bash CMD powershell command
"terminal.integrated.shell.windows": "D:\\Program Files\\Git\\bin\\bash.exe",
"git.path": "C:\\Program Files\\Git\\bin\\git.exe"
Copy the code
2. Add the deploy.sh file && to indicate that the command will not be executed further if an error occurs
rm -rf dist &&
yarn build &&
cd dist &&
git init &&
git add . &&
git commit -m "update" &&
git branch -M main &&
git remote add origin [email protected]:JinYoMo/comment-webpack-plugin.git &&
git push -f -u origin main &&
cd -
echo https://jinyomo.github.io/coco-ui-website/index.html
Copy the code
3. Enter the command
Sh // The deployment is completeCopy the code
Appendix:
No solution found for accessing address path — set build-path
Base: './', //assets in assetsDir: 'assets', // remove the underline '_assets'Copy the code
The completion of