FTP-Deploy-Action icon indicating copy to clipboard operation
FTP-Deploy-Action copied to clipboard

bug: files are not uploaded in case content is big

Open webcat12345 opened this issue 3 years ago • 3 comments

Bug Description I tried to use this action for small projects like react.js and others and it's working well. But if I try with PHP legacy codebase, because it is legacy, we need to upload vendor folder to the server. Once we upload vendor the first time, I added vendor folder to exclude the list. Expectation was upload success without any issue, but only folders are uploaded and they are just empty.

My Action Config

name: Deploy

# Controls when the action will run. Triggers the workflow on push or pull request
on:
  push:
    branches: [prod]

jobs:
  bulid:
    name: Production Deployment
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/[email protected]
      - name: Sync files
        uses: SamKirkland/[email protected]
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          exclude: .git*
            - .git*/**
            - vendor/*
          local-dir: "./"
          server-dir: "test_folder/"
          options: ""

      - name: Slack Notify
        uses: 8398a7/action-slack@v3
        with:
          status: ${{ job.status }}
          fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
        if: always() # Pick up events even if the job fails or is canceled.

My Action Log

Action result is success - exit code 0. No logs here.

webcat12345 avatar Mar 12 '21 07:03 webcat12345

+1

mylscompany avatar Mar 17 '21 18:03 mylscompany

In my experience the server times out because it's first creating all the directories, which doesn't keep the connection open. My logs expired but I think I got a 421 Timeout (900 seconds). One possible solution would be to sort the upload queue by uploading the containing files immediately after a directory has been created.

kapoko avatar Jul 13 '21 10:07 kapoko

Same here, using it on a Codeigniter project and it always fails because it takes a lot of time for it to create the folders.

nicolasguzca avatar Aug 04 '21 00:08 nicolasguzca

This should be fixed in the latest v4 version

SamKirkland avatar Mar 16 '23 16:03 SamKirkland