Skip to content

This action exposes the psftp command-line options to be executed from external file script. Very useful to automate SFTP deployments to any SFTP server.

Notifications You must be signed in to change notification settings

Luis97lol/PSFTP

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P-SFTP

This action exposes the psftp command-line options to be executed from external file script. Very useful to automate SFTP deployments to any SFTP server.

Dependencies

This actions depends on the psftp client tool (a part of PUTTY's Toolkit). So it must be correctly installed or configured in runner.

Linux

apt-get install putty-tools

Or equivalent for your distribution.
More information at https://www.puttygen.com/download-putty

Windows or MacOS

https://www.puttygen.com/download-putty

NO INSTALLATION NEEDED.

It would be recommended to add the containing folder to the PATH variable to have globally access in the command-line.

Inputs

host

Required. The hostname of the SFTP server.RECOMMENDED TO USE AN ENVIRONMENT VARIABLE

user

Required. The session username to login. RECOMMENDED TO USE AN ENVIRONMENT VARIABLE

pass

Required. The session password to login. RECOMMENDED TO USE AN ENVIRONMENT VARIABLE

hostkey

Optional. The host verification key. Only needed if not cached on running machine. RECOMMENDED TO USE AN ENVIRONMENT VARIABLE

scriptPath

Required. The relative or absolute path to the script file that contains the psftp commands to be executed.

Example usage

uses: Luis97lol/[email protected]
with:
  host: ${{ secrets.SFTP_HOST }}
  user: ${{ secrets.SFTP_USER }}
  pass: ${{ secrets.SFTP_PASS }}
  hostkey: ${{ secrets.SFTP_HOSTKEY }}  # Optional
  scriptPath: deploy.sh

Example Deploy Script Content (deploy.sh)

# Put in this file every SFTP actions you want to do. For example:
# Uploads the dist folder and rename it on the server
put -r dist coolAppName

About

This action exposes the psftp command-line options to be executed from external file script. Very useful to automate SFTP deployments to any SFTP server.

Resources

Stars

Watchers

Forks

Packages

No packages published