Added automatic upload of nightly build to server stored in repo secrets #349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 therun:
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 uploadedUSERNAME
- The username of an account authorized to connect and upload to the serverKEY
- The full text of a passwordless private key authorized to connect to and upload to the serverKNOWN_HOSTS
- Aknown_hosts
file, containing the server-key of the serverUPLOADPATH
- 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 theKNOWN_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.