Giter Site home page Giter Site logo

Comments (7)

SamKirkland avatar SamKirkland commented on May 17, 2024 1

I dug into this a bit and tried it out on my deployment tests. Looks like LFTP actually adds ** in front of all glob paths automatically so the correct code is the following.

--exclude-glob=.git*/** --exclude-glob=.git** --exclude-glob=.htaccess

Nice catch, i'll update the readme.

from ftp-deploy-action.

SamKirkland avatar SamKirkland commented on May 17, 2024

Because the .git and .htaccess files have already been uploaded to the server you'll have to manually delete them or add --delete-excluded

Try deleting those files manually, then re-deploying and let me know if it's working 😄

from ftp-deploy-action.

vvye avatar vvye commented on May 17, 2024

Thanks for your reply! I've tried deleting the .git and .github folders and they keep reappearing, unfortunately. As for .htaccess, I'd like to keep the version on the server and stop it from being overwritten with the one in the repo.

from ftp-deploy-action.

SamKirkland avatar SamKirkland commented on May 17, 2024

Can you verify it works on your end before I close this out 😄

from ftp-deploy-action.

vvye avatar vvye commented on May 17, 2024

Yep, looks like that worked. Thanks!

(edit: while that fixes the most important issue, --only-newer still seems to do nothing on my end.)

from ftp-deploy-action.

SamKirkland avatar SamKirkland commented on May 17, 2024

Yeah unfortunately FTP doesn't have any built in way of diffing two file trees. LFTP has built out some basic diffing on top of FTP but its still nowhere near as solid as rsync.

Recursion mode can be one of always', never', missing', newer'. With the option `newer' mirror compares timestamps of directories and enters a directory only if it is older or missing on the target side. Be aware that when a file changes the directory timestamp may stay the same, so mirror won't process that directory.

To be honest I've done limited testing with those flags as my sites are are relatively small so transferring the entire project is still quick. I need to spend some more time and see if a solution is possible.
Using --only-newer as well as --ignore-time (description: ignore time when deciding whether to upload) might be a good start ¯\(ツ)

from ftp-deploy-action.

pgram1 avatar pgram1 commented on May 17, 2024

I dug into this a bit and tried it out on my deployment tests. Looks like LFTP actually adds ** in front of all glob paths automatically so the correct code is the following.

--exclude-glob=.git*/** --exclude-glob=.git** --exclude-glob=.htaccess

Nice catch, i'll update the readme.

This solution did not work for .md files with --delete-excluded --exclude-glob=.md*/** --exclude-glob=.md** --exclude-glob=md*/** --exclude-glob=md** --exclude-glob=.MD*/** --exclude-glob=.MD** --exclude-glob=MD*/** --exclude-glob=MD** ARGS

Had to --exclude-glob=readme.md*/** --exclude-glob=readme.md**

from ftp-deploy-action.

Related Issues (20)

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.