Skip to content
upload-cloud

GitHub Action

Push to SFTP

v2.1 Latest version

Push to SFTP

upload-cloud

Push to SFTP

Push files to your server via SFTP (no SSH needed!)

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Push to SFTP

uses: AbleLincoln/[email protected]

Learn more about this action in AbleLincoln/push-to-sftp

Choose a version

Push to SFTP

This action uploads an entire directory to your remote SFTP server on push.

Inputs

(all default to an empty string)

Name Required? Description
host yes SFTP server
port yes SFTP server port
username no SFTP username
password no SFTP password
sourceDir yes Source directory to upload from (will upload all files in this directory)
targetDir yes Remote directory to upload to (WARNING: overwrites ALL files in this directory)
privateKey no SSH key to authenticate with
passphrase no Passphrase for an encrypted private key

Example usage

uses: AbleLincoln/[email protected]
with:
    host: example.com
    port: 22
    username: root
    password: ${{ secrets.password }}
    sourceDir: ./app/src/
    targetDir: ./html/

Feature Wishlist

  • only upload modified files
  • exclude files