Comments (4)
I have
images
folder on my website which stores user's uploaded images so that I want to keep this folder between deploys to not be deleted with sync.
Is there a way to achieve that??
Hello, sure thing! Simply use the --exclude switch or the --filter switch.
Here is an example (assuming your image folder is located at /var/www/images):
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --delete --exclude="images"
path: src/
remote_path: /var/www/html/
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
If your images folder is located at a deeper level and not at remote_path, simply adjust the path to your folder in the --exclude switch:
--exclude="public/images"
Greetings, Steve
from rsync-deployments.
I have some default images on it so I have to include it and while developing maybe we will add some other default images too so that I want to merge the images folder but I don't want to merge other folders right now I'm using the following SWITCHES
-rltgoDzvO
It will merge all other folders but I want only to merge the images
folder, not others.
is there any solution for my situation?
from rsync-deployments.
I have some default images on it so I have to include it and while developing maybe we will add some other default images too so that I want to merge the images folder but I don't want to merge other folders right now I'm using the following SWITCHES
-rltgoDzvO
It will merge all other folders but I want only to merge theimages
folder, not others.
is there any solution for my situation?
Yes you could use the --include switch to only have the images folder deployed by rsync.
Example: --include="*/images" --exclude="*"
If you wish to keep certain images (default images) but not all of them, you could combine --include and --exclude as shown above, or use a filter.
Example with --include/exclude:
--include="/images/" --include="/images/default.png" --exclude="*"
Example with --filter:
Create a filter.conf file in your .github folder (in your repo) with the following content:
+ /images/
+ /images/default.png
- *
Now you can use that filter with the --filter switch:
--filter="merge .github/filter.conf"
from rsync-deployments.
If you need further help, feel free to re-open this issue.
from rsync-deployments.
Related Issues (20)
- Can I authenticate SSH using password? HOT 3
- rsync: mkdir "/var/www/html" failed HOT 1
- Suggested additions to readme HOT 2
- Syntax error in command? HOT 2
- Job doesn't fail if SSH Key Passphrase is wrong HOT 1
- rsync deployment resulting in fail because received data is less than sent data HOT 2
- kex_exchange_identification: Connection closed by remote host HOT 1
- Run with rsh option fails HOT 2
- Fails inside containers due to reliance on $GITHUB_WORKSPACE HOT 1
- Permission denied HOT 1
- Passing an empty Github Action variable to `remote_path` circumvents validation and targets the root `/` directory HOT 2
- Rsync missing HOT 1
- (GitTea) No files are copied HOT 6
- I receive rsync: connection unexpectedly closed (0 bytes received so far) [sender] when using the library HOT 1
- Unable to negotiate with *** port ***: no matching host key type found. HOT 4
- Support teleport connection
- How can I connect to the local IP? There is no public IP.
- sync HOT 3
- Permission denied HOT 12
- rsync: [sender] link_stat "/github/workspace/rsync" failed: No such file or directory HOT 1
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.