Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docusaurus + /docs takes hours to build on Github actions #3676

Closed
danon opened this issue Nov 2, 2020 · 4 comments
Closed

Docusaurus + /docs takes hours to build on Github actions #3676

danon opened this issue Nov 2, 2020 · 4 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@danon
Copy link
Contributor

danon commented Nov 2, 2020

🐛 Bug Report

Docusaurus app, when run npm run build and/or npm run deploy works locally, but on github actions it takes hours; and fails anyway (Github terminates it after 360 minutes).

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Here's the repo with the failure: https://github.com/T-Regx/T-Regx.github.io/runs/1342405267?check_suite_focus=true

I've tried different jobs, I've written my own (build.yml and node.js.yml), and I've also copied one provided in: https://v2.docusaurus.io/docs/deployment/#deploy

The npm install and the ssh steps work just fine. But npm run build and/or npm run deploy seem stuck. You can read the logs in the actions

The log that appears to be repeating often is:
(node:2546) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/runner/work/T-Regx.github.io/T-Regx.github.io/website/.docusaurus/docusaurus-plugin-content-blog/default/site-blog-2020-02-18-release-0-9-2-md-8f9.json'
(node:2546) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Expected behavior

I would expect for docusaurus to build on GH Actions, just as easily as locally.

Actual Behavior

The build is failing. I understand it tries to read files from website/.docusaurus folder, but the folder doesn't exist there.

Your Environment

The repo is public: https://github.com/T-Regx/T-Regx.github.io You can see the workflows

  • Docusaurus version used: @docusaurus/core": "2.0.0-alpha.61
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Github Actions
  • Operating system and version (desktop or mobile):

Reproducible Demo

(Paste the link to an example repo, including a siteConfig.js, and exact instructions to reproduce the issue.)

https://github.com/T-Regx/T-Regx.github.io

@danon danon added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Nov 2, 2020
@danon
Copy link
Contributor Author

danon commented Nov 2, 2020

I'm attaching the build step log:
build.log

@danon danon mentioned this issue Nov 2, 2020
@slorber
Copy link
Collaborator

slorber commented Nov 3, 2020

Hi

Please including a npm/yarn lockfile and upgrade to latest docusaurus version.

We'll see if this happens again on latest version, and with a more deterministic build.

Also worth trying to see if the same problem happens on Netlify, or if you increase GH actions memory (if possible?)

@danon
Copy link
Contributor Author

danon commented Nov 7, 2020

@slorber Thank you!

I updated "@docusaurus/core" from "2.0.0-alpha.61" to "2.0.0-alpha.66" and it builds in no time now! Thank you.

@danon danon closed this as completed Nov 7, 2020
@slorber
Copy link
Collaborator

slorber commented Nov 7, 2020

Great 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

3 participants