chore(v1): fix CircleCI v1 site deploy (#4401)

This commit is contained in:
Sébastien Lorber 2021-03-11 17:31:36 +01:00 committed by GitHub
parent 31264b1245
commit ffe8b6106d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -100,7 +100,7 @@ jobs:
# done
# publish
GIT_USER=docusaurus-bot USE_SSH=false yarn run publish-gh-pages
GIT_USER=docusaurus-bot USE_SSH=false FORCE_DEPLOY=true yarn run publish-gh-pages
else
echo "Skipping deploy."
fi

View file

@ -41,6 +41,10 @@ const GITHUB_HOST =
process.env.GITHUB_HOST || siteConfig.githubHost || GITHUB_DOMAIN;
const CUSTOM_COMMIT_MESSAGE = process.env.CUSTOM_COMMIT_MESSAGE;
// Mostly added to unlock our own Docusaurus v1 site deploy...
// See https://github.com/facebook/docusaurus/issues/4394
const FORCE_DEPLOY = process.env.FORCE_DEPLOY;
if (!ORGANIZATION_NAME) {
shell.echo(
"Missing project organization name. Did you forget to define 'organizationName' in siteConfig.js? You may also export it via the ORGANIZATION_NAME environment variable.",
@ -69,7 +73,9 @@ if (USE_SSH === 'true') {
remoteBranch = `https://${GIT_USER}@${GITHUB_HOST}/${ORGANIZATION_NAME}/${PROJECT_NAME}.git`;
}
if (IS_PULL_REQUEST) {
if (FORCE_DEPLOY === 'true') {
shell.echo('Force deploy used!');
} else if (IS_PULL_REQUEST) {
shell.echo('Skipping deploy on a pull request');
shell.exit(0);
}

View file

@ -95,4 +95,4 @@ This feature has not been an easy one, and we would like to thank everyone that
Thanks for reading.
🙏 And please, add your brand new i18n sites to our [showcase page](https://v2.docusaurus.io/showcase). We accept any decently polished Docusaurus site here, and we are working on a [redesign](https://github.com/facebook/docusaurus/issues/4238) allowing you to filter sites by features.
🙏 And please, add your brand new i18n sites to our [showcase page](https://v2.docusaurus.io/showcase). We accept any polished Docusaurus site here, and we are working on a [redesign](https://github.com/facebook/docusaurus/issues/4238) allowing you to filter sites by features.