support: Docsy Theme can not be built.
Xu-Xihe opened this issue · 5 comments
Checklist
- I am using the latest version of this action.
- I have read the latest README and followed the instructions.
- I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.
Describe the bug
I have fork the docsy-example site and just copy the template for it in th README.md file.
I only changed the on: branches from main to master.
But after I pushed,it doesn't work.The Github Actions has showed me a '×',but I dont now why.
Relevant links
Public repository:https://github.com/Xu-Xihe/docsy-example
YAML config:
YAML workflow:
Relevant log output
Run npm ci
npm ci
shell: /usr/bin/bash -e {0}
npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-19T14_53_22_563Z-debug.log
Error: Process completed with exit code 1.
Additional context.
NO.
Why don't you put your package-lock.json
under Git control?
- Delete
package-lock.json
from.gitignore
- Create your
package-lock.json
file withnpm install
on your local machine - Git add, commit, and push the changes of
package-lock.json
and.gitignore
你为什么不把你的
package-lock.json
在 Git 控制之下?
- 删除
package-lock.json
自.gitignore
- 在本地机器上创建
package-lock.json
文件npm install
- Git的添加,提交和推变化
package-lock.json
和.gitignore
Yeah,I soon noticed it.But there still a problom that the Docsy-examples don't upload its package-lock.json
to the repo.
I have already solved this problem now,but a small suggestion: maybe mark out this to the 'README.md'.
If someone followed the tips from the Docsy,maybe they will upload the same .gitignore
.(someone like me don't know npm
very well)
I have opened google/docsy-example#140
This pull-request will help other users. Thanks!
Notes for newbies of npm
,
I have closed google/docsy-example#140. They seem to introduce the use of npm install
for newbies of npm
and put package-lock.json
out of Git control.
You can use npm install
on your CI workflow without doing so. But in that case, your workflow will take much more time than using npm ci
and there is no reproducibility. npm ci
is the best way on CI/CD pipelines. To make your project stable and deployment speed fast, use package-lock.json
and npm ci
. For more details about it, see the official documentation: npm ci | npm Docs.