Skip to content

Atomic deploy: support for SQL patches and less potential downtime during deploys - #5

Open
leglesslizard wants to merge 81 commits into
mainfrom
feature/add-symlink-and-sql-flows
Open

leglesslizard wants to merge 81 commits into
mainfrom
feature/add-symlink-and-sql-flows

Conversation

@leglesslizard

@leglesslizard leglesslizard commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

BEFORE MERGING INTO MAIN - do a string replace to remap to the right branch!
Change instances of "@feature/add-symlink-and-sql-flows" to "@main"


Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an “Atomic Deploy” flow for WordPress deployments that can (a) run SQL migrations against a copied table prefix and then switch wp-config.php to the new prefix, and (b) atomically re-point plugin/theme symlinks to a release directory for fast rollbacks. This is implemented via new reusable workflow(s), a composite action that runs the remote swap script over SSH, and migration script templates, with README documentation updates.

Changes:

  • Added templates/migrations/swap.sh + templates/migrations/migrate.sh to support prefix-copy migrations and symlink swapping during deploys.
  • Added actions/swap-and-migrate composite action and .github/workflows/atomic-deploy.yaml reusable workflow to run the remote deploy step and send notifications.
  • Expanded README.md documentation for Atomic Deploy, rsync/FTP deploys, and templates.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
templates/migrations/swap.sh Remote deploy script: preflight, migration/prefix-swap, symlink swap, and release pruning logic.
templates/migrations/migrate.sh Migration runner that applies pending SQL files and records them in a tracking table.
actions/swap-and-migrate/action.yml Composite action that SSHes to the server to run swap.sh, then emails on failure based on exit codes.
.github/workflows/atomic-deploy.yaml Reusable workflow wiring SSH setup + swap-and-migrate action with SMTP/notification secrets.
README.md Documents the new Atomic Deploy flow and updates other workflow/action documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/migrations/swap.sh Resolved
Comment thread templates/migrations/swap.sh Resolved
Comment thread actions/swap-and-migrate/action.yml Resolved
Comment thread actions/swap-and-migrate/action.yml Resolved
Comment thread actions/swap-and-migrate/action.yml Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved

This comment was marked as resolved.

@leglesslizard
leglesslizard requested a review from Copilot June 30, 2026 11:30

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@leglesslizard leglesslizard changed the title Feature/add symlink and sql flows Atomic deploy: support for SQL patches and less potential downtime during deploys Oct 8, 2026
@leglesslizard
leglesslizard marked this pull request as ready for review October 8, 2026 12:26
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