Skip to content

dangerous-clean-slate broked upload path #507

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

Open
Aeknasd145 opened this issue Jun 6, 2025 · 0 comments
Open

dangerous-clean-slate broked upload path #507

Aeknasd145 opened this issue Jun 6, 2025 · 0 comments

Comments

@Aeknasd145
Copy link

Aeknasd145 commented Jun 6, 2025

Bug Description
I used dangerous-clean-slate: true in my deploy.yml but when i used that with exclude function it uploaded all files to one of my excluded folder. My ftp account has access to main directory of website. I tried server-dir like '/' and './' but both uploaded to one of the excluded folder (especially the deepest path). But when i deleted dangerous-clean-slate: true, everything worked as expected. So, i believe that dangerous-clean-slate: true is not working properly with exclude and probebly trying to find deepest path and upload all repo inside it. Also, i try to write path to server-dir, then it created that folder and uploaded there, so it probably only occur when used main directory.

My Action Config

name: FTP Deploy

on:
  push:
    branches:
      - master  # Trigger only on push to main branch

jobs:
  ftp-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Deploy to FTP server
        uses: SamKirkland/[email protected]
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          server-dir: ./
          state-name: .ftp-deploy-sync-state.json
          exclude: |
            .git/**
            .github/**
            custom/folder/**
            custom/foler/2/**
            **/error_log
            *session*
            *madeline*
            *.log
            *.zip
            *.tar.gz

My Action Log

🗑️ Removing all files on the server because 'dangerous-clean-slate' was set, this will make the deployment very slow...
----------------------------------------------------------------
No file exists on the server "/website.com/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
Local Files:	9,867
Server Files:	0
----------------------------------------------------------------
Calculating differences between client & server
.... worked as expected only issue is created and uploaded folders and files to deepest path insted server-dir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant