vuepress-deploy icon indicating copy to clipboard operation
vuepress-deploy copied to clipboard

[Solution Included] Add package.json to tutorial & Add SOURCE_BRANCH variable

Open Maxlinn opened this issue 2 years ago • 1 comments

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.

Maxlinn avatar Apr 02 '22 13:04 Maxlinn

Thanks @Maxlinn It would be better to update to README ~ 🤣

jenkey2011 avatar Apr 06 '22 05:04 jenkey2011