Comments (3)
Looks like the rsync-option: ... --delete-after
is doing that.
That will delete every file, which is not part of the Repository like the .env
file.
I'm not sure how rsync handles that if you still use --delete-after
with the --exclude=.env
, but I'm pretty sure you should give it a try without the --delete-after
parameter.
See https://man7.org/linux/man-pages/man1/rsync.1.html ( Search: "--delete-after")
Update:
I just did a test with the "vendor" folder (since it's common in PHP projects), which shouldn't be deleted after rsync (just for that case).
If I add the --exclude=vendor
parameter to the existing parameter list (based on your example), the folder still persist after sync.
from web-deploy.
Thanks @AryaSvitkona.
If I add the
--exclude=vendor
parameter to the existing parameter list (based on your example), the folder still persist after sync.
Did you include the --delete-after
option?
from web-deploy.
Yes, exactly. See an example below which works for us.
`jobs:
web-deploy:
name: 🎉 Deploy website
runs-on: ubuntu-latest
# to change
if: github.ref == 'refs/heads/main'
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: 📂 Sync Files
uses: SamKirkland/web-deploy@v1
with:
target-server: ...
remote-user: ...
private-ssh-key: ...
source-path: ./
destination-path: ~/www/foobar/foobar/wp-content/plugins/pluginname/
rsync-options: --archive --verbose --compress --human-readable --progress --delete-after --exclude=vendor`
from web-deploy.
Related Issues (15)
- web-deploy not working: Unable to resolve action `SamKirkland/[email protected]`, unable to find version `1.0.0` HOT 5
- Permission denied (publickey,password) HOT 8
- Add password field
- rsync-option --ignore not working HOT 1
- Missing required input "source-path" HOT 2
- OPenSSL3 - ssh-rsa HOT 1
- Error: The process '/usr/bin/rsync' failed with exit code 255 HOT 4
- Permissions are getting reset or changed after GitHub Action syncs
- Please create option to prevent the Known hosts list warning HOT 1
- Permissions for web_deploy_key are too open
- Permission denied HOT 1
- Load key "/home/runner/.ssh/web_deploy_key": invalid format HOT 7
- configuration example HOT 1
- rsync error in ssh deploy HOT 16
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 web-deploy.