Skip to content

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

Closed
@danon

Description

@danon

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions