Add manually-triggered preview deploy workflow and host deploy script#2498
Open
Blessy7-eng wants to merge 3 commits intodjango:mainfrom
Open
Add manually-triggered preview deploy workflow and host deploy script#2498Blessy7-eng wants to merge 3 commits intodjango:mainfrom
Blessy7-eng wants to merge 3 commits intodjango:mainfrom
Conversation
6b12a63 to
45a3926
Compare
Author
|
Hi! I have fixed the formatting and executable permissions for the script and workflow file. I had to force-push the changes, so the CI is currently awaiting manual approval to run again. Ready for review whenever a maintainer has a moment! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a GitHub Actions workflow that can be triggered manually to deploy a preview version of the site via SSH. It also includes the necessary shell script to handle the deployment steps on the host server.
Changes
.github/workflows/preview-deploy.yml: Usesworkflow_dispatchto allow manual triggers.scripts/deploy-preview.sh: Handles git fetching, migrations, and service restarts.Infrastructure Requirements
For this to work, the following secrets need to be added to the repository settings by an admin:
PREVIEW_HOSTPREVIEW_USERPREVIEW_SSH_KEYPREVIEW_PROJECT_DIRChecklist
I noticed this was an open proposal and decided to contribute a working version.
I'm happy to adjust the script based on the specific server environment requirements!