-
Notifications
You must be signed in to change notification settings - Fork 4
Deploy PR previews to branch folders #284
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>
PR SummaryThis pull request introduces several enhancements to the
These changes aim to improve the deployment workflow by allowing branch-specific previews and cleanups, making it easier to manage documentation updates for different branches. Test Suggestions
|
* Deploy PR previews to branch folders (#284) * Add PR preview deploy and delete to docs-demo site * Re-add missing Makefile updates * Remove --delete option from deploy-demo * Update site/Makefile Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com> * Tweak help wording --------- Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com> * Updated user management docs — Renaming roles (#285) * Edits to summaries of docs under Managing users * Added section for renaming roles * Quick tweak to Register models for user groups * Update site/guide/configuration/manage-permissions.qmd Co-authored-by: Nik Richers <nik@validmind.ai> * Update site/guide/configuration/manage-roles.qmd Co-authored-by: Nik Richers <nik@validmind.ai> * Quick tweak, comma unification --------- Co-authored-by: Nik Richers <nik@validmind.ai> --------- Co-authored-by: Nik Richers <nik@validmind.ai> Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Internal Notes for Reviewers
This PR adds the ability to deploy PR previews based on the working branch you are on. You can use this to deploy PR previews until we can automate the process via a GitHub workflow.
PR previews all go into a
s3://docs-ci-cd-demo/site/pr_previews/$(GIT_BRANCH)/
folder to distinguish them from the rest of the docs-demo site which is otherwise largely untouched (see "One caveat").Run
make
to see the new options:Deploy a PR preview
Run
make deploy-demo-branch
:The command line output gives you a link you can click to open the preview:
Delete
Run
make delete-demo-branch
:This gives you the standard 404 and links then take you to the docs-demo site that is otherwise untouched.
Other ways of testing
You can also check that files get added or removed with the
aws s3
command. E.g. check what happens withaws s3 ls s3://docs-ci-cd-demo/site/pr_previews/
before and after you run the newmake
commands.One caveat
I had to remove the
--delete
option from themake deploy-demo
command as it otherwise deletes thepr_previews/
subfolder. I think this an acceptable compromise as we might remove the regular docs-demo functionality at some point in the future. You mainly just need an index.html file in the root of the S3 bucket which we could generate in the future with all of the PR preview links.External Release Notes