facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.24k stars 1.8k forks source link

Improve website build+deploy #4696

Closed zpao closed 1 month ago

zpao commented 1 month ago

I got distracted looking at something else for Relay and noticed the repo itself is several GB. This is almost certainly primarily from the gh-pages branch. It currently gets rebuilt on every commit to main and since the content of the pages include the last modified by & time using that commit data, every single generated page gets rebuilt as well. For example, https://github.com/facebook/relay/commit/79a357573cfc5fc2ce8de15ba133630f3edac8d1 updated 4672 files. That build job took almost 30 minutes (https://github.com/facebook/relay/actions/runs/9067652200)

So I did a few things

  1. Removed the modified by stuff. It's not useful and honestly potentially misleading.
  2. Updated actions to latest versions. This alone shaved off a bunch of time
  3. Persisted the docusaurus cache.

Warm build (typical) time is now 6 minutes. https://github.com/zpao/relay/actions/runs/9052335508

captbaritone commented 1 month ago

This is awesome. Thank you!

facebook-github-bot commented 1 month ago

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 month ago

@captbaritone merged this pull request in facebook/relay@24c9a5326ca8591815a70ad48c773a9f543b6c8a.