Skip to content

sahil-io/release-upload-sftp

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

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release Uplade Action

This action uploads a repo as a zip/archive to SFTP server

Inputs

package_name:
    description: 'name of the zip file'
    required: true
username:
    description: 'username'
    required: true
server:
    description: 'your sftp server'
    required: true
port:
    description: 'your sftp server port'
    required: true
ssh_private_key:
    description: 'you can copy private_key from your *.pem file, keep format'
    required: true
local_path:
    description: 'will put all file under this path. e.g ./*'
    required: true
remote_path:
    description: 'release file
    required: true
script_path:
    description: 'script to run'
    required: false

Example usage

name: Deployment Workflow

on:
  release:
  push:
    types: [published]
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: deploy files to server
        uses: sahilNR/release-upload-sftp@v4
        with:
          package_name: 'demo-package'
          username: 'ubuntu'
          server: '${{ secrets.SERVER_IP }}'
          port: 20
          ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
          local_path: './*'
          remote_path: ${{ secrets.REMOTE_PATH}}

NOTE: Add .gitattributes to your repo with export-ignore attribute to exclude files from the zip. [Example]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •