juliankahlert/Hetzner Deploy Action

Create or update a Hetzner Cloud server and deploy a directory to it.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
hcloud_tokenHetzner API token (store as secret)yes
server_nameLogical server name to find or createyes
project_tagTag used to identify servers shared across reposyes
imageHetzner image slug (default: ubuntu-24.04)noubuntu-24.04
server_typeHetzner server type (default: cx23)nocx23
ipv6_onlyIf true, provision with IPv6 only (no public IPv4). Warning: GitHub-hosted runners do not provide outbound IPv6 connectivity, so this action's deploy stages and any later steps that connect to an IPv6-only server require a self-hosted runner with IPv6 support.nofalse
duckdnsDuckDNS configuration in combined token:domain formatno
public_keySSH public key to register on the serveryes
ssh_private_keySSH private key for rsync (store as secret)yes
ssh_userSSH user for connecting to the servernoroot
service_nameSystemd service name to restart after deployno
serviceStructured systemd service YAML mapping. Configures the generated unit file. When the 'user' key is set, the pipeline provisions the system account and chowns the working directory (or target_dir). Overrides legacy flat service_* and exec_start inputs for matching settings.no""
service_typeSystemd service Type= value (default: simple). Overridden when the structured service YAML input includes type.nosimple
service_restartSystemd service Restart= value (default: on-failure). Overridden when the structured service YAML input includes restart.noon-failure
service_restart_secSystemd service RestartSec= value in seconds (default: 5). Overridden when the structured service YAML input includes restart-sec.no5
exec_startCustom systemd ExecStart= command to use for the service. When omitted, a placeholder command is used and a warning is emitted.no
source_dirDirectory in the workspace to deployno.
target_dirTarget directory on the VPS where files will be placedno/opt/app
container_imageContainer image reference — enables the podman stage when setno
container_portContainer port mapping for Podman, e.g. 8080 or 8080:80no8080
haproxy_cfgPath to HAProxy config — enables the haproxy stage when setno
host_portHost port for HAProxy routing (default: 443)no443
routeRoute pattern for HAProxy routing (default: /*)no/*
app_portApplication port for HAProxy routingno
certbotString boolean to enable certbot ACME supportnofalse
certbot_portString port for certbot ACME challenge handlingno8888
firewall_enabledIf true, enable the firewall stagenotrue
haproxy_fragmentPath to an HAProxy config fragment to append when haproxy_cfg is setno
haproxy_fragment_nameOptional name used for the HAProxy fragment file on the servernofragment
firewall_extra_portsComma-separated extra firewall ports to allow, e.g. 8080, 8443no""
namedescription
server_ipPublic IP address of the server. Reflects the server's actual networking state: IPv4 by default, or IPv6 when the server is IPv6-only. When reusing an existing IPv6-only server, this returns the IPv6 address even if ipv6_only is set to false.
server_idHetzner server ID
server_statusServer status after provisioning