wlixcc/SFTP-Deploy-Action

hidden files won't be taken care of

Closed this issue · 3 comments

In the local path, if there are files starting with a dot, like .env, it will not be passed to the remote folder.

Is there until today any fix for that? Having the same issue with .env

Yeah please add exclude or something thanks :)

Thank you for bringing up this issue! 🚀

Regarding Hidden Files and SFTP Uploads

By default:

  • If you use local_path: './*', it will not include hidden files (e.g., .gitignore, .env, .htaccess).
  • If you want to include hidden files, you should set local_path to ./ instead of ./*.

🛠️ Solution: Include Hidden Files

Update your workflow configuration as follows:

- name: Deploy with hidden files
  uses: wlixcc/SFTP-Deploy-Action@v1.2.5
  with:
    username: 'root'
    server: 'your.server.ip'
    ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
    local_path: './'
    remote_path: '/var/www/app'
    rsyncArgs: '--exclude=node_modules --exclude=*.log'
    sftpArgs: '-o ConnectTimeout=5'