twelve-of-code-official / website

The source code for the Twelve of Code website
https://mesure.x10.mx/twelve-of-code
GNU General Public License v3.0
0 stars 0 forks source link

Github Action pushes all branches to FTP server, not just main #6

Closed BeepBot99 closed 9 months ago

BeepBot99 commented 9 months ago

This is a really important problem and needs to be fixed immediately. If you are testing something in another branch, when you commit it, it will push that branch to the website.

BeepBot99 commented 9 months ago

This has been fixed but still needs testing to ensure that it has worked.

Mesure73L commented 9 months ago

Just checking, is this supposed to happen? image

BeepBot99 commented 9 months ago

No, that is not supposed to happen. You made the commits in main, so it should have gone through.

BeepBot99 commented 9 months ago

It has been fixed.

Explanation

I copied the code for preventing it in all other branches from StackOverflow. Using git on desktop, the default name for the main branch is master. However, on GitHub, it is main. The code I used prevented the action from running in all other branches than master, which doesn't exist. What I wanted was to prevent it from running in all branches other than main. I have changed and tested it. It is now working as intended.