name: Specific Folder FTP Upload on: push: branches: - main # Change this if your default branch is master paths: - 'resources/views/form/**' # 👈 CHANGE THIS to your folder name jobs: ftp-deploy: runs-on: ubuntu-latest steps: # 1. Checkout the code - name: Checkout Repository uses: actions/checkout@v4 with: fetch-depth: 2 # Fetches the current and previous commit to calculate differences # 2. Extract and Upload only the changed files - name: Sync Changed Files to FTP uses: SamKirkland/FTP-Deploy-Action@v4.3.5 with: server: ${{ secrets.FTP_SERVER }} username: ${{ secrets.FTP_USERNAME }} password: ${{ secrets.FTP_PASSWORD }} # Only sync the files within your specific folder local-dir: ./resources/views/form/ # 👈 CHANGE THIS to match your folder server-dir: /var/www/rapport/resources/views/form/ # 👈 CHANGE THIS to your remote FTP path