Docusaurus: Docusaurus Enterprise Github pages website does not publish to master

Created on 6 Mar 2020  ·  6Comments  ·  Source: facebook/docusaurus

🐛 Bug Report

https://github.com/facebook/docusaurus/pull/689 did not fully implement the ability to use enterprise pages with custom urls. For example anything that does not end in .github.io will not publish to the master branch when using the deploy script. It will instead publish to the gh-pages branch.
https://github.com/facebook/docusaurus/blob/4aee06e74f7acd5fc2f58e8bdf2eb8ec75a1a576/packages/docusaurus/src/commands/deploy.ts#L64-L65

Have you read the Contributing Guidelines on issues?

Yes.

To Reproduce

(Write your steps here:)

  1. Do a deploy to an self hosted github enterprise that does not use .github.io, for example github.company.io

Expected behavior

I expect the publish to realise this is a github page repo and publish to the master branch.

Actual Behavior

The project published to gh-pages branch

Your Environment

The github enterprise we use is in the format github.company.io

Reproducible Demo

Unfortunately this is not easy to reproduce as it uses a full self hosted github enterprise

Thankyou

bug needs triage

All 6 comments

@lukecollier I understand correctly that in your case you are dealing with two different repositories? If so, can you set CURRENT_BRANCH and then cross-repo publish will work, or am I mistaken?

https://github.com/facebook/docusaurus/blob/4aee06e74f7acd5fc2f58e8bdf2eb8ec75a1a576/packages/docusaurus/src/commands/deploy.ts#L79-L84

@lex111 hello! Thank you for the quick response,
I don't believe this is the problem (although this is a cross repo publish)
The issue is difficult to explain but I'll try again,
https://pages.github.com/ described here can also be done on an enterprise self hosted github however when we try this on our self hosted github we have a different end to the url that is not github.io instead it is github.mycompany.co this means the code here:
https://github.com/facebook/docusaurus/blob/4aee06e74f7acd5fc2f58e8bdf2eb8ec75a1a576/packages/docusaurus/src/commands/deploy.ts#L64-L65
does not publish to master and instead publishes to gh-pages branch. This is unexpected as the repository name is intended for an github pages website repository. The fix could be in providing a custom github pages host env variable, in our case GH_PAGES_HOST=".github.mycompany.co".

Will it solve this problem if we just introduce a new environment variable
DEPLOYMENT_BRANCH?

вт, 10 мар. 2020 г. в 12:41, Luke Collier notifications@github.com:

@lex111 https://github.com/lex111 hello! Thank you for the quick
response,
I don't believe this is the problem I mean (although this is a cross repo
publish)
The issue is difficult to explain but I'll try again,
https://pages.github.com/ described here can also be done on an
enterprise self hosted github (though the url will end in /pages) however
when we try this on our self hosted github we have a different end to the
url that is not github.io instead it is github.mycompany.co this means
the code here:

https://github.com/facebook/docusaurus/blob/4aee06e74f7acd5fc2f58e8bdf2eb8ec75a1a576/packages/docusaurus/src/commands/deploy.ts#L64-L65
does not publish to master and instead publishes to gh-pages branch. The
fix could be in providing a custom github pages host env variable, in our
case .github.mycompany.co.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/docusaurus/issues/2362?email_source=notifications&email_token=ABBUIOYN4JAPMWBXZHBM75DRGYDM7A5CNFSM4LC53OX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOKWFUI#issuecomment-596992721,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUIO25XH6CZIRLOFI4UP3RGYDM7ANCNFSM4LC53OXQ
.

@lex111 That would be an ideal solution

opened up a pr with the proposed feature https://github.com/facebook/docusaurus/pull/2396 👍

resolved in https://github.com/facebook/docusaurus/pull/2396,
can this be closed?

@lukecollier yes, thank you for your help!

Was this page helpful?
0 / 5 - 0 ratings