garygrossgarten / github-action-scp

⬆️ Copy a folder to a remote server using SSH
MIT License
189 stars 53 forks source link
actions copy github-actions scp ssh

GitHub Action SCP

Simple GitHub Action to copy a folder or single file to a remote server using SSH. This is working with the latest GitHub Actions.

✨ Example Usage

Copy a folder recursively to a remote server

- name: Copy folder content recursively to remote
  uses: garygrossgarten/github-action-scp@release
  with:
    local: test
    remote: scp/directory
    host: ${{ secrets.HOST }}
    username: ${{ secrets.SSH_USER }}
    password: ${{ secrets.PASSWORD }}

Copy a single file to a remote server

- name: Copy single file to remote
  uses: garygrossgarten/github-action-scp@release
  with:
    local: test/oof.txt
    remote: scp/single/oof.txt
    host: ${{ secrets.HOST }}
    username: ${{ secrets.SSH_USER }}
    password: ${{ secrets.PASSWORD }}

🔐 Set your secrets here: https://github.com/USERNAME/REPO/settings/secrets.

Check out the workflow example for a minimalistic yaml workflow in GitHub Actions.

Result

result of example ssh workflow

Options

Development


This thing is build using Typescript and ssh2 (via node-ssh). 🚀