docs: scaffold forge.electronjs.org Docusaurus site - #4386
claude[bot] wants to merge 4 commits into
Conversation
Add a standalone `website/` Docusaurus project that builds the existing `docs/` content at the site root. It has its own lockfile and is not a monorepo workspace, so the root lockfile, constraints, knip and lint are untouched. `website/sidebars.ts` re-exports `docs/sidebars.ts`. Also add a `website.yml` workflow that builds the site on PRs and pushes to `next` touching `docs/` or `website/`, and drop the leftover GitBook `layout:` frontmatter block from `docs/import-existing-project.md`. No hosting or deploy step yet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P4HRbe7XtfgT6eVQZbjcUb
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Caution Review the following alerts detected in dependencies. According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. It is recommended to resolve "Warn" alerts too. Learn more about Socket for GitHub.
|
|
Working with Erick Zhao Socket Security is red on this PR because two transitive dependencies of I'm not overriding the org security policy from a bot account. If a maintainer agrees these are acceptable, the per-PR override is Generated by Claude Code |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P4HRbe7XtfgT6eVQZbjcUb
Add a `deploy` job to the Website workflow that runs after `build` on pushes to `next`: it downloads the `website` artifact, logs in to Azure via OIDC (the `website-publish` environment holds the federated credential) and `azcopy sync`s the build into the storage account's `$web` container, deleting stale blobs. A dedicated concurrency group keeps two pushes from racing the sync. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P4HRbe7XtfgT6eVQZbjcUb
…pushes to next Trigger the Website workflow on `v*` tag pushes (plus PRs for the build check) and gate the publish job on `refs/tags/v*`, matching how the TypeDoc publish triggers. The `website-publish` environment's deployment policy moves to the `v*` tag pattern on the infra side. Disable the setup-node package-manager cache in a job that publishes runtime artifacts (zizmor cache-poisoning). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P4HRbe7XtfgT6eVQZbjcUb
Requested by Erick Zhao · Slack thread
Decisions (from the Slack thread): the site lives in this repo under
website/; https://forge.electronjs.org is the canonical URL; the site is built fromdocs/onnextand published on every version tag (v*), not on pushes; v7 docs and electronforge.io (redirects, GitBook URLs) are out of scope for now.Before:
docs/onnexthas 56 Docusaurus-flavoured pages (plus one partial) and a completesidebars.ts, but nothing builds or publishes them; the public site is still the GitBook-era electronforge.io.After: a standalone
website/Docusaurus 3.10 project builds../docsat the site root (yarn buildpasses withonBrokenLinks: 'throw', 0 warnings, ~5 s). TheWebsiteworkflow builds it on PRs that touchdocs/,website/or the workflow itself, and on every version tag (v*) — matching how the TypeDoc publish in #4385 triggers — builds and publishes it to forge.electronjs.org.Summarize your changes:
How.
website/is its own Yarn project (ownyarn.lock,.yarnrc.ymlpointing at the vendored../.yarn/releases/yarn-4.18.0.cjs,nodeLinker: node-modules), deliberately not a monorepo workspace, so the root lockfile,yarn constraints, knip, oxfmt/oxlint and markdown lint are untouched — all of them still pass at the root with this branch checked out.docusaurus.config.tspointsdocs.pathat../docswithrouteBasePath: '/'(sodocs/index.mdis the home page),staticDirectories: ['../docs/static', 'static']so the existing/img/image.pngreference resolves, and aneditUrlfunction that maps tohttps://github.com/electron/forge/edit/next/docs/<file>. Navbar: Docs, API (packages.electronjs.org/forge/latest — not live yet), electronjs.org, GitHub; footer is minimal. React 19,@docusaurus/faster(Rspack/SWC), TypeScript 5.9 foryarn typecheck.website/sidebars.tsis a one-line re-export ofdocs/sidebars.ts, so the sidebar keeps living next to the content.docs/content edit:docs/import-existing-project.mdloses the leftover GitBooklayout:frontmatter block (11 lines). Nothing else indocs/changed — no links, headings or partials needed touching;_partials/is excluded by Docusaurus's default_*rule and the two partial imports resolve..github/workflows/website.yml: triggers onpull_request(path-filtered) and onpushofv[0-9]+.[0-9]+.[0-9]+*tags. Thebuildjob installs, builds and uploadswebsite/buildas thewebsiteartifact on both; thedeployjob runs on every version tag (v*) only — matching how the TypeDoc publish in ci: publish TypeDoc to packages.electronjs.org on version tags #4385 triggers — under thewebsite-publishenvironment withid-token: write, downloads that artifact, logs in to Azure withazure/loginvia OIDC andazcopy syncs it into the storage account's$webcontainer with--delete-destination=true --compare-hash=MD5. Aforge-website-deployconcurrency group (no cancel) keeps two tag pushes from racing the sync. All actions are SHA-pinned; zizmor reports no findings.Depends on
forge.electronjs.orgstorage account / static website, DNS, thewebsite-publishenvironment on this repo (deployment policy: tags matchingv*, so the OIDC subject isrepo:electron/forge:environment:website-publish) and theAZURE_FORGE_WEBSITE_OIDC_CLIENT_ID/AZURE_FORGE_WEBSITE_STORAGE_ACCOUNT_NAMEsecrets (AZURE_OIDC_TENANT_IDandAZURE_OIDC_SUBSCRIPTION_IDare the shared org values). Until that lands, thedeployjob will fail atazure/loginon the first version tag; thebuildjob is unaffected./config/makers/squirrel.windows) are emitted assquirrel.windows/index.html; the static website must not treat.windowsas a file extension (Docusaurus's ownservefalls back to the SPA shell for it).Known issues
copy-webpack-plugin,@pnpm/network.ca-file) — see docs: scaffold forge.electronjs.org Docusaurus site #4386 (comment). It is not a required check; a maintainer needs to triage/acknowledge them.Follow-ups (not in this PR)
https://js.electronforge.io/...links indocs/(plus the "API Docs" entry indocs/sidebars.ts) once packages.electronjs.org/forge is live — they use the old_electron_forge_*TypeDoc slugs; the new format is_electron-forge_*.docs/cli.mdhas 9 H1 headings; it renders but the table of contents is flat.CONTRIBUTING.mdand the issue template still point at the old docs repo.enonly.🤖 Generated with Claude Code
https://claude.ai/code/session_01P4HRbe7XtfgT6eVQZbjcUb
Generated by Claude Code