Skip to content

dSFTP

Actions

About

Easily deploy your files onto your server via SFTP protocol
v1
Latest
Starย (5)

๐ŸŒŸ Beta 1.0.1 !

Warning Don't forget to watch and star this repository to be notified on future releases

dSFTPAction

๐ŸŽ‰ Usage

Here is an exemple of a file that you can add to your .github/workflows

Note
We strongly recommend that you use Github Secrets to configure this Action.

# C:\Users\dynamored\MyHandsomeProjet\.github\workflows\sftp-action.yml

on:
  pull_request:
    types:
      - closed
    branches:
      - 'main'
      - 'master'

# /\ When a pull request is merged onto 'main' or 'master' then:

jobs:
  sftp_project:
    runs-on: ubuntu-latest
    name: Send your latest writed files to your server
    steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: SFTP Upload
      uses: DynamoRed/dsftp-action@v1
      with:
        host: ${{ secrets.SFTP_Host }}				# The IP adress of your server.
        user: ${{ secrets.SFTP_User }}				# The name of the user you want to use to upload your files/folders.
        password: ${{ secrets.SFTP_Password }}			# The password of the user mentionned before.

        ## Paths:
        # Paths are written as objects (key/value) with key = local path and value = parent remote path.
        # For this exemple, src is a folder and README.md a file.

        paths: '{ "./src" : "/home/john/my_handsome_project", "./README.md" : "/home/john/my_handsome_projec" }'

        port: 22						# OPTIONAL -- The SFTP port of your server. DEFAULT: 22

        agent: ''						# OPTIONAL -- Path to your server SSH agent.
        key: ${{ secrets.SFTP_Key }}				# OPTIONAL -- Your SSH private key content.
        keyPassphrase: ${{ secrets.SFTP_Key_Passphrase }}	# OPTIONAL -- If your SSH private key defined just before is encrypted, write the passphrase here.

๐Ÿ› ๏ธ Contribute

  1. Fork this repository

  2. Install dependencies

npm install
  1. Build action
npm run build
  1. Open a pull request to integrate your modifications

๐Ÿ“ƒ License

GPL-3.0

dSFTP is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Easily deploy your files onto your server via SFTP protocol
v1
Latest

dSFTP is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.