Skip to content

Hetzner Deployer

Actions

About

Rolling deployments using Hetzner Loadbalancers for zero downtime deployments
v1.0.2
Latest
Star (18)

Hetzner Deployer

Github Action for rolling deployments using Hetzner Loadbalancers.

For a list of provided servers (VMs):

  • Removes the server target from the loadbalancer (via Hetzner API)
    • Possibility to wait a specified time to handle the inflight requests
  • Run commands on the server (via SSH)
    • Deploy your new application version
  • Inserts back the server into the loadbalancer
  • Proceeds to the next server

Usage example

name: Deploy
on: [push]
jobs:
  deploy:
    if: github.ref == 'refs/heads/main'
    needs: [build]
    runs-on: ubuntu-latest
    steps:
      - uses: carlosflorencio/hetzner_deployer@v1
        with:
          servers: 58.16.128.73, 28.45.100.18
          hetzner_token: ${{ secrets.HETZNER_TOKEN }}
          ssh_key: ${{ secrets.SSH_KEY }}
          ssh_port: 22
          graceful_wait_seconds: 5
          commands: |
            docker rm -f app || true
            docker run -d --restart always \
              --name app \
              -p 80:80 \
              ${{ needs.build.outputs.image }}

Hetzner Deployer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Rolling deployments using Hetzner Loadbalancers for zero downtime deployments
v1.0.2
Latest

Hetzner Deployer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.