Comments (6)
- 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.
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:
- 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
) - Simpler - you have full control over the rsync command without having to remember which action args go where
from rsync-deployments.
I've proposed an attempt to do that in #7.
from rsync-deployments.
I'm still getting docker exiting with code 2 when it gets to the entrypoint.sh. Any thoughts?
from rsync-deployments.
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.
@generator85 Make sure your destination server:/path captured in $3 variable in entrypoint.sh
from rsync-deployments.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsync-deployments.