Giter VIP home page Giter VIP logo

Comments (6)

pujianto avatar pujianto commented on August 28, 2024 17
- name: Deploy to Staging 
  uses: contention/[email protected]
  env: 
    DEPLOY_KEY: ${{secrets.DEPLOY_KEY}} 
  with: 
    args: "-avzr --delete --exclude .htaccess --exclude /uploads/ [email protected]:/srv/myapp/public/htdocs/"

from rsync-deployments.

IlyaSemenov avatar IlyaSemenov commented on August 28, 2024 9

For whoever is landing up here, I recommend ditching the pre-made rsync actions and going either fully manually or use simpler helper like ssh-agent:

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup SSH agent
        uses: webfactory/[email protected]
        with:
          ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
      - name: Setup known_hosts
        run: echo 'my.host.io ssh-rsa AAAAB3....+8U=' >> ~/.ssh/known_hosts
      - name: Sync project files
        run: rsync -avzr --delete ${GITHUB_WORKSPACE}/ [email protected]:/srv/files/

(you can generate the line for known_host with ssh-keyscan, or simply copy it from your own known_hosts)

The reasons being:

  1. Secure - you provide a specific SSH fingerprint, so the workflow will fail on MitM or DNS attacks (unlike this action, which runs with -o StrictHostKeyChecking=no)
  2. Simpler - you have full control over the rsync command without having to remember which action args go where

from rsync-deployments.

thom4parisot avatar thom4parisot commented on August 28, 2024

I've proposed an attempt to do that in #7.

from rsync-deployments.

jonathanhatch avatar jonathanhatch commented on August 28, 2024

I'm still getting docker exiting with code 2 when it gets to the entrypoint.sh. Any thoughts?

from rsync-deployments.

generator85 avatar generator85 commented on August 28, 2024

It seems to work here, I get a full list of all the files and this after:

sent 250663 bytes received 56 bytes 167146.00 bytes/sec
total size is 37470734 speedup is 149.45

But no files appear at the receiving end. Any ideas what could cause this?

from rsync-deployments.

pujianto avatar pujianto commented on August 28, 2024

@generator85 Make sure your destination server:/path captured in $3 variable in entrypoint.sh

from rsync-deployments.

Related Issues (5)

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.