Coder Social home page Coder Social logo

lftp-mirror-action's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

leek

lftp-mirror-action's Issues

onlyDifferent input parameter?

I have a suggestion. Is it possible to add an input parameter similar to onlyNewer but instead of uploading files with a more recent modification date upload files if the modification date has simply changed?

In my case, I'm using this in a workflow to deploy theme files to WordPress. By default or setting onlyNewer to true speeds up the workflow run time, but the issue I have is if someone was to go into the WordPress theme file editor and directly make changes to a file, that file would now have a more recent modification date to the file in the source repository. This means when running the workflow and deploying, that file won't upload, the changes to that file will persist and will never be in sync until a new commit modifies that source file and makes it 'newer'.

To ensure the theme files on WordPress are always 100% in sync with the source repository, I could set onlyNewer to false but that would increase the workflow run time as now every file has to be uploaded again regardless of whether it has changed or not.

I guess just the possibility of deployed files not actually being deployed in this scenario made me think of this. Maybe it's a bit of an edge case though, so just using onlyNewer false even if it takes longer would be best to avoid the possibility? Just a suggestion anyway.

lftp-mirror-action uploads all files every time it runs despite setting "onlyNewer: true"

Hi everyone,

I read the section https://github.com/pressidium/lftp-mirror-action#restoring-modification-times, but I'm not sure I understand it correctly. Since I still encounter the issue that all my files are being uploaded every time, even after adding "onlyNewer: true". I'm also not sure if I need to add "fetch-depth: 0" and if this is connected to the issue. It added it and still same issue with uploading all files instead of only newer files.

Please see my main.yaml below. Do you have any suggstions what I am missing?

on: push
name: Publish to IONOS
jobs:
  web-deploy:
    name: HN MVP Deploy
    runs-on: ubuntu-latest
    steps:
    - name: Get latest code
      uses: actions/checkout@v3

    - name: Sync files
      uses: pressidium/lftp-mirror-action@v1
      with:
        host: ${{ secrets.FTP_SERVER }}
        port: 22
        user: ${{ secrets.FTP_USERNAME }}
        pass: ${{ secrets.FTP_PASSWORD }}
        # lftp settings
        onlyNewer: true
        # Mirror command options
        localDir: '.'
        remoteDir: './HN'
        reverse: true

Thank you in advance!

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.