Help with continuous deployment through Github

Thanks to this community and others I was able to successfully get my app up and running from my local computer. Now, I want to migrate it to Github, and enable the function where every time I push a change, the app re-deploys to integrate the change. However, I’m running into an issue with the automatic deployment part.

Using this tutorial: Continuous Deployment with Fly.io and GitHub Actions, I’m able to use fly launch successfully on the repo that’s cloned to my local computer, create the Fly API deploy token, and create a Github repository secret to put the token in. I also created a fly.yml file and copy-pasted code from the tutorial, changing two mentions of “master” to “main” as that is what my repo calls the default branch. However, when I push these changes, nothing happened!

  • My first thought is that I copy-pasted the deploy token wrong. It starts with FlyV1, a space, then the start of a long complicated chain. I tried saving the repo secret with and without this header of sorts, but no dice.

  • Second thought is that I shouldn’t have tried using fly launch while in the directory of my locally cloned files (aka they are in my Documents folder on my computer, but any changes I make to them I can commit and push using GitHub Desktop). I learned how to change working directories in terminal with my last question, but I’m not sure how I could set the directory to link to Github more directly?

Any other ideas for where I could have messed up? I don’t see any action logs or failure messages anywhere, because it never attempted deployment, but happy to relay whatever I can to troubleshoot! Thanks!

changing two mentions of “master” to “main” as that is what my repo calls the default branch.

This was my problem, I was only supposed to change the first instance of master to main, but not the second one. Good to know for the future! Solved!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.