Skip to content

Conversation

phuzion
Copy link
Contributor

@phuzion phuzion commented Aug 19, 2021

This PR adds the automatic upload of nightly builds to an off-site server via SFTP using a predefined SSH key stored in GitHub Secrets.

As proof that this works, I submit my most recent commit to this branch and the associated GitHub Actions workflow run to go along with it.

As a note, the SFTP command is currently forced to use IPv4. This can be changed by removing -4 from the run: command.

Prior to merging this PR, the following must be added as Repository Secrets in settings:

  • HOST - The FQDN of the server to which nightlies will be uploaded
  • USERNAME - The username of an account authorized to connect and upload to the server
  • KEY - The full text of a passwordless private key authorized to connect to and upload to the server
  • KNOWN_HOSTS - A known_hosts file, containing the server-key of the server
  • UPLOADPATH - The absolute path of the directory where the files will be uploaded, with a trailing slash. Example: /srv/www/ or /home/user/directory/

KNOWN_HOSTS can be easily generated by moving your local ~/.ssh/known_hosts to a temporary location, and SSHing to the server. Copy the contents of the new ~/.ssh/known_hosts file into the KNOWN_HOSTS secret, and you should be good to go.

If there are any questions about this PR, I'm happy to answer here or on IRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant