Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dry-run didn't work w/ dangerous-clean-slate :/ #285

Closed
iBotPeaches opened this issue May 18, 2022 · 1 comment · Fixed by #313
Closed

dry-run didn't work w/ dangerous-clean-slate :/ #285

iBotPeaches opened this issue May 18, 2022 · 1 comment · Fixed by #313
Assignees
Labels
bug Something isn't working

Comments

@iBotPeaches
Copy link

Bug Description
Using dry-run with dangerous-clean-slate does not work.

My Action Config

      - name: Upload Website
        uses: SamKirkland/FTP-Deploy-Action@4.3.0
        with:
          server: ${{ steps.vars.outputs.website_host }}
          username: ${{ steps.vars.outputs.website_username }}
          password: ${{ steps.vars.outputs.website_password }}
          protocol: 'ftps'
          local-dir: website/dist/
          server-dir: ${{ steps.vars.outputs.website_folder }}
          dangerous-clean-slate: true
          dry-run: true

My Action Log

Run SamKirkland/FTP-Deploy-Action@4.3.0
----------------------------------------------------------------
🚀 Thanks for using ftp-deploy. Let's deploy some stuff!   
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/FTP-Deploy-Action
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/FTP-Deploy-Action#badge
----------------------------------------------------------------
🗑️ Removing all files on the server because 'dangerous-clean-slate' was set, this will make the deployment very slow...
Clear complete
----------------------------------------------------------------

I was testing a move from Jenkins to GH Actions and this dry-run looked sweet. However, after my test my testing server is completely blank in the intended folder. It seems the entire directory was deleted, but the dry-run partially worked since none of my files uploaded.

It appears this is because this line on the parent repo never checks for the other property dry-run and thus deletes regardless of the flag - https://github.com/SamKirkland/ftp-deploy/blob/master/src/deploy.ts#L73

@SamKirkland SamKirkland self-assigned this May 27, 2022
@SamKirkland SamKirkland added the bug Something isn't working label May 27, 2022
@SamKirkland
Copy link
Owner

Sorry about that. Thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants