Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the static-websites GitHub action #597

Open
9 tasks
MarcoIeni opened this issue Oct 1, 2024 · 7 comments
Open
9 tasks

Remove the static-websites GitHub action #597

MarcoIeni opened this issue Oct 1, 2024 · 7 comments
Assignees

Comments

@MarcoIeni
Copy link
Member

MarcoIeni commented Oct 1, 2024

We maintain a GitHub Action called static-websites that uploads a static website to GitHub Pages and (optionally) invalidates the cache of a CloudFront distribution. This action is used a few times in the rust-lang organization, but only rust-lang/thanks makes use of the cache invalidations.

Since GitHub now supports and encourages uploading static websites as artifacts, we want to refactor the workflows that use the static-websites action and replace it. Once that has been done, we can remove the action from this repository.

For each workflow that uses this action, we need to:

  1. Replace the usage of static-websites with actions/upload-github-pages-artifact to upload the pre-built archive
  2. Add a new deploy job as per the documentation for actions/deploy-github-pages-site

Repositories

The following repositories need to be updated:

The rust-lang/thanks repository is slightly different, since that uses a CloudFront distribution. Replacing the static-websites action in this repository will require more steps and help from an administrator.

  • Add a CNAME file for thanks.rust-lang.org (see Managing a custom domain for your GitHub Pages site)
  • As an admin, change the DNS record to point to GitHub Pages
  • As an admin, remove the CloudFront distribution once it is no longer used
  • Replace the static-websites action as per the instructions above

Resources

For maintainers

@jdno
Copy link
Member

jdno commented Oct 2, 2024

Do we even need the action anymore or could we replace it by hosting static websites on GitHub Actions? I feel like that would give users the most flexibility and remove one more piece of "self-managed" infrastructure from our stack.

@MarcoIeni
Copy link
Member Author

we are already using github pages
Image
The only thing is that we add a CDN on top of it, which is "recommended" in case oh high usage

@jdno
Copy link
Member

jdno commented Oct 3, 2024

Oh, my bad. I thought this was the action that uploaded static sites to S3 and serve them from there. If we're already using GitHub Pages, I actually think there is even less of a reason to maintain this action. None of the sites that we have deployed has anywhere near the traffic to need a CDN. Might be a nice opportunity to clean up both some code and some AWS resources.

@MarcoIeni
Copy link
Member Author

If there's no need for the CDN, we could remove the "invalidate" line from this action and delete the CDNs from terraform, yes 👍
The action at this point doesn't need the aws input variables.

Worth discussing this in zulip first though 👍

@jdno
Copy link
Member

jdno commented Oct 3, 2024

Started a discussion here: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Remove.20static-websites.20GitHub.20Action

@MarcoIeni
Copy link
Member Author

After our discussion, we agreed to delete this action and replace where it's used with official GitHub Actions

@jdno jdno changed the title Improve the static-websites GitHub action Remove the static-websites GitHub action Oct 8, 2024
@github-project-automation github-project-automation bot moved this to Backlog in infra-team Oct 8, 2024
@jdno jdno moved this from Backlog to Ready in infra-team Oct 8, 2024
@miikka
Copy link

miikka commented Oct 10, 2024

I'll take a stab at this (at EuroRust impl room), starting with the async-book repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

No branches or pull requests

3 participants