Giter VIP home page Giter VIP logo

action-rsyncer's Introduction

RSyncer GitHub Action

Action on GH marketplace   GitHub release   GitHub

This action uses rsync to sync files (probably) generated by a previous step in the workflow with a remote server.

Secrets

DEPLOY_KEY

Required SSH Key to be used during the rsync operation.

Inputs

flags

Required Flags to pass to rsync. Default -avzr --delete.

options

Required Rsync options. i.e. --exclude.

ssh_options

Required SSH command options. i.e. -p 2222.

src

Required Local path to be synced. i.e. public/.

dest

Required Remote server and path. i.e [email protected]:/var/www/server.com/.

Outputs

status

Friendly status of the rsync command.

Usage

Sync local folder to remote server

This example syncs the local folder public with the /var/www/server.com folder on the remote server server.com.

Add the a workflow file in your repository: .github/workflows/rsync.yml.

- name: Deploy to server
  id: deploy
  uses: Pendect/[email protected]
  env:
    DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
  with:
    flags: '-avzr --delete'
    options: ''
    ssh_options: ''
    src: 'public/'
    dest: '[email protected]:/var/www/server.com'

- name: Display status from deploy
  run: echo "${{ steps.deploy.outputs.status }}"

Use distinct port on remote server

This example deals with a server listening to ssh on a port other than 22.

Using a rsync workflow file: .github/workflows/rsync.yml, we modify the ssh_options input to have the -p 2222 option:

- name: Deploy to server
  id: deploy
  uses: Pendect/[email protected]
  env:
    DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
  with:
    flags: '-avzr --delete'
    options: ''
    ssh_options: '-p 2222'
    src: 'public/'
    dest: '[email protected]:/var/www/server.com'

- name: Display status from deploy
  run: echo "${{ steps.deploy.outputs.status }}"

Changes

v1.1.0 (2019-12-05)

  • Add support to distinct remote port [ericof]

v1.0 (2019-11-1)

  • Initial release of Pendect/action-rsyncer [ericof]

About

Pendect is reshaping the way you navigate your daily flood of news.

Stay up to date with news events across the globe and be a part in the fight against fake news.

Follow us

pendecthq on twitter

action-rsyncer's People

Contributors

ericof avatar jay-oswald avatar steffenbew avatar svx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.