The best guide
-
Get
.github/workflows/autodeploy.yml
to your repo -
Generate private and public key on your server.
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- Enter the filename, i.e.
github-actions
- Leave passphrase empty
- Move your public key to
/.ssh/
folder by
cat github-actions.pub >> authorized_keys
- Enter the filename, i.e.
-
Create secrets in you repo
DEPLOY_SERVER_HOST
— ip address or server name. SSH is smart, it can get ip from server name.DEPLOY_SERVER_USERNAME
— name of your ssh accountDEPLOY_SERVER_KEY
— your private key file content. This is the key file without.pub
extensionDEPLOY_PATH_FROM_HOME
— your $HOMEhome/e/usename/yourdomain.com
. Don't use slash at the begin and end of string
Now, after you push changes to maser
branch, it automaticaly will be loaded to your server