Skip to content

Feature/add symlink and sql flows#5

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

Feature/add symlink and sql flows#5
leglesslizard wants to merge 38 commits into
mainfrom
feature/add-symlink-and-sql-flows

Conversation

@leglesslizard

@leglesslizard leglesslizard commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

When merging in we'll need the following to get notifications to work:

  • Add SMTP_SERVER, SMTP_USERNAME, SMTP_PASSWORD at organisation level (used by the failure notification email)
  • NOTIFY_EMAIL is optional per-repo - defaults to #uptime_alerts if omitted (email is harcoded for now, I assume we'll want this to go to something@pie.co.de)

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 Outdated
Comment thread templates/migrations/swap.sh Outdated
Comment thread actions/swap-and-migrate/scripts/migrate.sh
Comment thread actions/swap-and-migrate/action.yml Outdated
Comment thread actions/swap-and-migrate/action.yml
Comment thread actions/swap-and-migrate/action.yml Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated

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

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

Comment thread actions/swap-and-migrate/action.yml Outdated
Comment thread .github/workflows/atomic-deploy.yaml
Comment thread templates/migrations/swap.sh Outdated
Comment thread templates/migrations/swap.sh
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
@leglesslizard leglesslizard requested a review from Copilot June 30, 2026 11:30

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

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

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

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

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

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

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

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

Comment thread actions/swap-and-migrate/action.yml Outdated
Comment thread actions/swap-and-migrate/scripts/migrate.sh Outdated
Comment thread actions/swap-and-migrate/scripts/swap.sh Outdated
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