Skip to content

Commit 03d6ddc

Browse files
slorberclaude
andauthored
break(core): remove CircleCI env var fallbacks from the deploy command (AI-assisted) (#12714)
* break(core): remove CircleCI env var fallbacks from the deploy command (AI-assisted) Remove the undocumented CircleCI-specific behaviors of `docusaurus deploy`, inherited from the v1 `publish-gh-pages` script: - `CIRCLE_PROJECT_USERNAME` fallback for the organization name - `CIRCLE_PROJECT_REPONAME` fallback for the project name - early exit when `CI_PULL_REQUEST` or `CIRCLE_PULL_REQUEST` is set Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: apply lint autofix --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: slorber <749374+slorber@users.noreply.github.com>
1 parent e6a07cc commit 03d6ddc

2 files changed

Lines changed: 2 additions & 16 deletions

File tree

‎packages/docusaurus/src/commands/deploy.ts‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,35 +126,22 @@ This behavior can have SEO impacts and create relative link issues.
126126
}
127127

128128
const organizationName =
129-
process.env.ORGANIZATION_NAME ??
130-
process.env.CIRCLE_PROJECT_USERNAME ??
131-
siteConfig.organizationName;
129+
process.env.ORGANIZATION_NAME ?? siteConfig.organizationName;
132130
if (!organizationName) {
133131
throw new Error(
134132
`Missing project organization name. Did you forget to define "organizationName" in ${siteConfigPath}? You may also export it via the ORGANIZATION_NAME environment variable.`,
135133
);
136134
}
137135
logger.info`organizationName: name=${organizationName}`;
138136

139-
const projectName =
140-
process.env.PROJECT_NAME ??
141-
process.env.CIRCLE_PROJECT_REPONAME ??
142-
siteConfig.projectName;
137+
const projectName = process.env.PROJECT_NAME ?? siteConfig.projectName;
143138
if (!projectName) {
144139
throw new Error(
145140
`Missing project name. Did you forget to define "projectName" in ${siteConfigPath}? You may also export it via the PROJECT_NAME environment variable.`,
146141
);
147142
}
148143
logger.info`projectName: name=${projectName}`;
149144

150-
// We never deploy on pull request.
151-
const isPullRequest =
152-
process.env.CI_PULL_REQUEST ?? process.env.CIRCLE_PULL_REQUEST;
153-
if (isPullRequest) {
154-
logger.info('Skipping deploy on a pull request.');
155-
process.exit(0);
156-
}
157-
158145
// github.io indicates organization repos that deploy via default branch. All
159146
// others use gh-pages (either case can be configured actually, but we can
160147
// make educated guesses). Organization deploys look like:

‎project-words.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ redwoodjs
237237
Reloadable
238238
reloadable
239239
renderable
240-
REPONAME
241240
retrocompatibility
242241
retrocompatible
243242
rmiz

0 commit comments

Comments
 (0)