Trigger upload only for a specific branch
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
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:
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.