Skip to content

Add manually-triggered preview deploy workflow and host deploy script#2498

Open
Blessy7-eng wants to merge 3 commits intodjango:mainfrom
Blessy7-eng:feature/preview-workflow
Open

Add manually-triggered preview deploy workflow and host deploy script#2498
Blessy7-eng wants to merge 3 commits intodjango:mainfrom
Blessy7-eng:feature/preview-workflow

Conversation

@Blessy7-eng
Copy link
Copy Markdown

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

  • Added .github/workflows/preview-deploy.yml: Uses workflow_dispatch to allow manual triggers.
  • Added 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_HOST
  • PREVIEW_USER
  • PREVIEW_SSH_KEY
  • PREVIEW_PROJECT_DIR

Checklist

  • Workflow file validated.
  • Deployment script included.
  • No conflicts with the main branch.

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!

@Blessy7-eng Blessy7-eng force-pushed the feature/preview-workflow branch from 6b12a63 to 45a3926 Compare February 6, 2026 09:26
@Blessy7-eng
Copy link
Copy Markdown
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!

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.

1 participant