Skip to content

Releases: pablo-codes/local-git-deploy

v2.1.0 - Zero-Config SFTP & Native SSH Auth

Choose a tag to compare

@pablo-codes pablo-codes released this 29 Aug 10:38

What's New in v2.1.0 🔑

This release brings a new quality-of-life feature: Zero-Config SFTP Authentication.

local-git-deploy now seamlessly integrates with your system's native SSH configuration!

If you already have SSH keys set up to access your server, you no longer need to specify credentials in your .env or local-git-deploy.yml file.

✨ Highlights

  • ~/.ssh/config Support: The tool now parses your native SSH config file. You can simply provide a server alias (e.g., server: myserver), and it will automatically resolve the true HostName, User, Port, and IdentityFile directly from your SSH config.
  • SSH Agent Support: Automatically detects keys loaded via ssh-add using the SSH Agent (SSH_AUTH_SOCK on Linux/macOS, or the OpenSSH Authentication Agent on Windows).
  • Default Key Auto-Detection: Automatically probes for default SSH keys (~/.ssh/id_ed25519, ~/.ssh/id_rsa, ~/.ssh/id_ecdsa) if no other credentials are provided.
  • Optional User Field: When using SFTP, the user field in your config is now optional. It will gracefully fall back to the User specified in your ~/.ssh/config, or default to your local OS username.

Note: This is purely additive and 100% backwards compatible. Any explicit credentials you have in your .env or .yml files will always take priority over the auto-detected settings.

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

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!

v1.2.1-minor changes

Choose a tag to compare

@pablo-codes pablo-codes released this 02 Jun 13:22

Full Changelog: v1.2.1...v1.2.1

v1.2.0 — OIDC Trusted Publishing & CI improvements

Choose a tag to compare

@pablo-codes pablo-codes released this 09 Mar 17:25

What's changed

CI/CD

  • Switched npm publish to OIDC Trusted Publishing (no static token required)
  • Fixed FTP pre-cleanup using lftp with SSL cert bypass for shared hosting
  • Fixed stale .deploy-sync-state causing "bad object" errors on CI
  • Added workflow_dispatch for manual publish re-runs

v1.1.1 — Security & Reliability Patch

Choose a tag to compare

@pablo-codes pablo-codes released this 09 Mar 17:10

What's changed

Security fixes

  • FTPS: Certificate validation is now enabled by default. Self-signed cert support requires explicit insecure: true in config (previously always disabled)
  • Config: Warns when password is read from the YAML file instead of .env

Bug fixes

  • Deleted files now correctly respect exclude glob patterns
  • Filenames with spaces or special characters no longer break uploads (null-terminated git output)
  • Private key paths starting with ~ are now correctly expanded
  • Remote sync state hash is validated before use — corrupted state files now give a clear, actionable error
  • Temp files moved to os.tmpdir() with PID suffix to prevent race conditions on parallel runs

Improvements

  • Connection timeouts added for both FTP and SFTP
  • engines field added — requires Node.js >=16
  • Protocol validation: unsupported protocols now fail with a clear error