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

Add workflow for deploying website after updating the documentation #239

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

madolson
Copy link
Member

@madolson madolson commented Feb 27, 2025

This will allow the website to automatically get updated when we update the doc repository. I setup a repository action on the website github, which allows incoming events to trigger the build and deploy action.

Some notes about security. The credential being used has write permission the website repository, so to compensate I locked down all the branches to require PRs, which should prevent any malicious attackers if they get access to the credentials. The downside is no more directly pushing to the website, which I think is an OK tradeoff.

This PR is dependent on this PR getting merged first: valkey-io/valkey-io.github.io#214.

Some other things I investigated:

  1. Re-usable workflows: I wasn't able to get the deploy functionality to have permissions across repository, these seem to only work correctly within the same repository.
  2. Triggering the website build from this repo. This required duplicating the build and deploy steps. This seemed like a cleaner approach.

@@ -1,18 +1,16 @@
name: Trigger master website deploy
name: Trigger website deploy
on:
push:
branches:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could scope down the file paths that trigger this, but I decided to leave this as is for now. The rate of change on the documentation repository isn't that high.

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Very nice. It's very satisfying to see changes deployed immediately when merging a PR. It's nice to see for the contributor too.

Requiring PRs on the website repo is a good idea regardless.

@madolson madolson merged commit fa4cdbf into main Feb 27, 2025
3 checks passed
@zuiderkwast zuiderkwast deleted the main-test branch February 27, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants