vuepress-deploy
vuepress-deploy copied to clipboard
[Solution Included] Add package.json to tutorial & Add SOURCE_BRANCH variable
Hi there, thanks for bringing us this amazing script, credits to your work. During deployment, i encountered few problems and solved them. However, i know little about frontend so cannot help with the code directly, but i can still bring out some hints.
Lack of package.json
Describe the bug
When following the instruction of tutorial, error occurs that "no package.json found".
Solution
I followed this Example Repository to add an identitcal package.json file to the root of my repo, then it solved.
Default branch no longer names master
now
Describe the bug
After solving the first one, error still ocurrs that master
branch does not exists.
Solution
Nowadays github no longer uses master
as default branch, main
instead.
The environment variables of this script does not provide one to specify the source branch.
As a workaround for now, i changed my repository's default branch name from main
to master
, then it solved.
Thanks @Maxlinn It would be better to update to README ~ 🤣