Skip to content

Latest commit

 

History

History
 
 

ssh

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

SSH for GitHub Actions

Run a thing on your server.

This action will run the provided argument as a command on your $HOST via SSH.

image

Usage

To use the action simply add the following lines to your .github/main.workflow

action "Run deploy script" {
  uses = "maddox/actions/ssh@master"
  args = "/opt/deploy/run"
  secrets = [
    "PRIVATE_KEY",
    "HOST",
    "USER"
  ]
}

Required Arguments

The argument you will use is the command that will be ran on your server via SSH.

Examples

  • args = "/opt/deploy/run"
  • args = "touch ~/.reload"

Required Secrets

You'll need to provide some secrets to use the action.

  • PRIVATE_KEY: Your SSH private key.
  • HOST: The host the action will SSH to to run the command. ie, your.site.com.
  • USER: The user the SSH command will auth as with the private key.
  • SOURCE: The directory path to copy to the server.
  • TARGET: Target directory path on the server.

Optional Secrets

  • PORT: The port SSH is listening on. Default: 22

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.