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

Trigger upload only for a specific branch

Open nikiluk opened this issue 1 year ago • 2 comments

Hi! Is there a way to trigger upload only for a specific branch? Example, when the repo files are changing in the main branch, do the upload, however if the files get change in the feature-X branches - don't trigger the FTP sync.

Thanks a lot

nikiluk avatar Oct 05 '24 19:10 nikiluk

If you use if: github.ref == 'refs/heads/main' under the job then it should only run on pushes to the main branch (assuming the rest of your yml is the default from the README) see in full below: image

luke-cnnect avatar Oct 21 '24 13:10 luke-cnnect

If you use if: github.ref == 'refs/heads/main' under the job then it should only run on pushes to the main branch

@luke-cnnect worked perfectly for me, thank you. I tested with pushing another branch and got "This job was skipped" in the actions logs.

mikechalmers avatar May 03 '25 21:05 mikechalmers