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

1.0.4 fails on publishing to github pages #378

Closed
chenglou opened this issue Jan 6, 2018 · 5 comments
Closed

1.0.4 fails on publishing to github pages #378

chenglou opened this issue Jan 6, 2018 · 5 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@chenglou
Copy link
Contributor

chenglou commented Jan 6, 2018

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

CI (linux)

Steps to Reproduce

Not too sure this repros on every project setup. See below

Expected Behavior

Build succeeds.

Actual Behavior

Error message:

Error: Copying build assets failed with error 'Error: Cannot copy '/home/ubuntu/reasonml.github.io/website/build' to a subdirectory of itself, '/home/ubuntu/reasonml.github.io/website/build/reasonml.github.io-master'.'

Reproducible Demo

See the failure at https://circleci.com/gh/reasonml/reasonml.github.io/38, and the subsequent fix at https://circleci.com/gh/reasonml/reasonml.github.io/39 which is just a revert to docusaurus 1.0.3 (aka the old version used to work)

Note:

  • My repro is a github org page. projectName is "" in siteConfig.js. I recall such trick was necessary for a github org page, to publish to master. Not sure how relevant this detail is.
  • Maybe this is related to the change from rsync to fs.copy?

cc @JoelMarcey, @rickyvetter

@JoelMarcey JoelMarcey added the bug An error in the Docusaurus core causing instability or issues with its execution label Jan 8, 2018
@JoelMarcey
Copy link
Contributor

Thanks @chenglou -- yeah, I didn't expect that behavior to change from 1.0.3 to 1.0.4 -- so this is definitely a bug. Let me go through the relevant commits to see where we might have gone awry here.

@JoelMarcey
Copy link
Contributor

@chenglou I have a test site that I am using to try to fix this...

https://github.com/JoelMarcey/JoelMarcey.github.io

I ran into the same bug you did, but only after I set both:

projectName: 'JoelMarcey.github.io',
organizationName: 'JoelMarcey',

in siteConfig.js.

This is because in order to test locally, these variables need to be set; If you leave those blank, it will use the the information from the CircleCI when running there as described here: https://docusaurus.io/docs/en/commands.html#docusaurus-publish

So I would recommend that you fill those out for clarity, but like you said, it is not strictly necessary if you are going to publish only through CircleCI.

So now on to figuring out why the bug is happening...

@JoelMarcey
Copy link
Contributor

We use fs.copy, and this is probably the reason why it is failing:

jprichardson/node-fs-extra#83

@JoelMarcey
Copy link
Contributor

I think we got the fix in #384. I will push out a 1.0.5 bug fix release tomorrow/Wed so that these are part of the npm package.

@JoelMarcey
Copy link
Contributor

1.0.5 has been pushed and this should be fixed now. Thanks for bringing this up.

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

2 participants