Skip to content

CI: Share website install steps between preview and deploy - #2179

Closed
vzaidman wants to merge 3 commits into
react:mainfrom
vzaidman:vzaidman/website-install-action
Closed

vzaidman wants to merge 3 commits into
react:mainfrom
vzaidman:vzaidman/website-install-action

Conversation

@vzaidman

@vzaidman vzaidman commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #2178. Review only the last commit.

Adds a website-install composite action, like yarn-install, that sets up Node with the yarn cache for website/yarn.lock and installs the website's dependencies. preview-website.yml and deploy-website.yml use it, so deploy-website.yml no longer restores the yarn cache by hand. preview-website.yml also runs when the action changes.

Changelog: [Internal]

Test plan

  • yarn format-check passes, and the action and workflows parse as YAML.
  • Not tested: the workflows on GitHub. The preview workflow will run on this PR, since it touches the action.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 5, 2026
@vzaidman
vzaidman force-pushed the vzaidman/website-install-action branch from 6188171 to 909bb2e Compare November 6, 2026 12:38
@vzaidman
vzaidman force-pushed the vzaidman/website-install-action branch 2 times, most recently from b9bdc97 to 7368a3f Compare November 6, 2026 12:52
Adds `AGENTS.md` (imported by `CLAUDE.md`), instructions for coding agents working on Metro:

- Docs: they are in `docs/`. Read them to understand Metro's intended behavior, update them in the same change when it affects behavior they describe, and flag changes that make them inaccurate when reviewing.
- Benchmarks: measure performance-sensitive changes with `scripts/benchmark-patches/benchmark-patches.js`, and offer to benchmark when making or reviewing them.

Changelog: [Internal]
The website build checks links between doc pages (`onBrokenLinks`, `onBrokenAnchors`), but it only ran as part of the deploy, when a commit landed on `main`. A PR that broke a link was green and then broke the deploy.

Adds `preview-website.yml`, which runs `yarn build` in `website/` on PRs that touch `docs/**` or `website/`. In forks, it also runs on pushed branches and publishes each one as a preview at `https://<owner>.github.io/<repo>/<branch>/`, once the fork owner enables workflows and GitHub Pages from the `gh-pages` branch. "Export to GitHub" pushes to the author's fork by default, so exported diffs get previews too.

`WEBSITE_BASE_URL` overrides the website's `baseUrl`. The help page links use `Link`, so they follow it.

Changelog: [Internal]
Adds a `website-install` composite action, like `yarn-install`, that sets up Node with the yarn cache for `website/yarn.lock` and installs the website's dependencies. `preview-website.yml` and `deploy-website.yml` use it, so `deploy-website.yml` no longer restores the yarn cache by hand. `preview-website.yml` also runs when the action changes.

Changelog: [Internal]
@vzaidman
vzaidman force-pushed the vzaidman/website-install-action branch from 7368a3f to ff0297a Compare November 6, 2026 12:57
@vzaidman

vzaidman commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Combined into #2178.

@vzaidman vzaidman closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant