There are two ways to publish your code:
A) Either by deploying a new version, which is done as follows:
- File -> Manage Versions
- Add a new version -> Close dialog
- Publish -> Deploy as web app
- Select the version added -> Update
B) Or by always using your latest code
- Publish -> Deploy as web app
- Under the web app URL, click on the latest code button.
- This way, any change done and saved will automatically be updated upon a refresh