Giter VIP home page Giter VIP logo

action-sshpass-rsync's Introduction

Deploy over RSYNC via SSHPASS

Github Action to deploy via rsync and sshpass in order to enable deployments on hosts, which don't support key based ssh

Usage

- name: Deploy to Server
  uses: mai-space/action-sshpass-rsync@v1
  with:
    host: ${{ secrets.DEPLOY_HOST }}
    user: ${{ secrets.DEPLOY_USER }}
    port: ${{ secrets.DEPLOY_PORT }}
    pass: ${{ secrets.DEPLOY_PASS }}
    local: "path/of/your/local/mashine"
    extra: "--your extra params for rsync"
    remote: "path/where/to/deploy/to"
    runBefore: |
      cd somewhere/
    runAfter: |
      cd ../somewhere/back/to

You can do something before and after your deployment on the remote. For this, you use the runBefore and runAfter inputs.

Optional (and not firmly tested)

You can use your private key and just enjoy the deployment part of this action. But I must say, that I have not tested this. Feel free to contribute.

- name: Deploy to Server
  uses: mai-space/action-sshpass-rsync@v1
  with:
    host: ${{ secrets.DEPLOY_HOST }}
    user: ${{ secrets.DEPLOY_USER }}
    port: ${{ secrets.DEPLOY_PORT }}
    key: ${{ secrets.PRIVATE_KEY }}
    local: "path/of/your/local/mashine"
    extra: "--your extra params for rsync"
    remote: "path/where/to/deploy/to"
    runBefore: |
      cd somewhere/
    runAfter: |
      cd ../somewhere/back/to

Disclaimer

Parts of this action are heavily inspired by matheusvanzan/sshpass-action and D3rHase/rsync-deploy-action.

I have looked up how to make my own action there and build upon their code. So please give them some love.

action-sshpass-rsync's People

Contributors

mai-space avatar fmw666 avatar igoragatti 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.