Skip to content

v2.0.0 — multi-branch deployment and ssh remote script execution

Choose a tag to compare

@pablo-codes pablo-codes released this 01 Aug 09:21
· 1 commit to main since this release

What's New in v2.0.0 🚀

This is a major release that transforms local-git-deploy from a simple file sync tool into a lightweight, powerful deployment pipeline for FTP and SFTP servers.

🌟 Major Features

  • Multi-Branch Deployment: You can now configure different servers and directories for different branches in a single local-git-deploy.yml file! It supports exact branch names (like main and staging) and glob patterns (like feature/*).
  • Per-Branch Credentials: Use the new password_env config key to securely map different branches to different environment variables (e.g., DEPLOY_PASSWORD_PROD, DEPLOY_PASSWORD_STAGING) loaded from your .env file.
  • Remote SSH Hooks (SFTP Only): Automate your post-deploy tasks! You can now define pre_deploy and post_deploy commands in your config to run database migrations, clear caches, or put your site in maintenance mode directly on the server over SSH. Supports both inline commands and script files.

✨ Enhancements

  • Added a --branch flag to manually override branch detection (perfect for CI/CD environments).
  • Added a --force flag to deploy unmapped branches using base default configurations.
  • State tracking is now completely branch-isolated. Deploying to staging generates a .deploy-sync-state-staging file, meaning you'll never accidentally corrupt your main branch's deployment state.
  • Enhanced error handling and input validation across the board.

📝 Documentation Updates

  • The README.md has been completely rewritten with extensive examples of the new multi-branch and SSH hook features, plus a new "Use Cases" section.
  • Updated the sample local-git-deploy.sample.yml to showcase advanced setups.

Note: Existing flat configurations will continue to work perfectly without any modifications. The new branches: configuration block is entirely opt-in!