-
-
Notifications
You must be signed in to change notification settings - Fork 29
Free hosting via fly.io
a-sync edited this page Jul 21, 2024
·
6 revisions
After you've set up your free accounts on both GitHub and Fly.io, launching this app becomes straightforward. You just create your personal copy (fork) of the app on GitHub, and then use GitHub Actions to handle the initial setup and deployment of your app right from GitHub. From then on, all your future updates or adjustments will be deployed automatically.
- click the fork button to create your own copy of game-server-watcher
- go to the repo Settings > Actions > General: allow all actions (if no confirmation comes up, disable then re-enable all actions)
- register an account at https://fly.io/app/sign-up
- add a payment method to your personal organization to enable app deployments
- go to Accounts > Access Tokens and create a new fly API token
- go to the forked repo on GitHub: Settings > Secrets > Actions
- create a new secret named
FLY_API_TOKEN
, with the value of the fly API token previously generated
- create a new secret named
FLY_REGION
, with the value of a fly region ID
- go to the forked repo on GitHub: Actions > Workflows and select 🏗 Create cloud app
- use the Run workflow panel on the right and the Run workflow button to create a new fly app and a 1gb volume for it
- go to the forked repo on GitHub: Actions > Workflows and select ⚙ Configure cloud app
- use the Run workflow panel on the right and the Run workflow button to update the available settings
- rules for the input fields:
- empty fields are skipped (no action)
- fields with the value
-
(minus, dash) delete the secret - fields with non empty or
-
value create/update the secret
- go to the forked repo on GitHub: Actions > Workflows and select ☁️ Deploy to the cloud
- use the Run workflow panel on the right and the Run workflow button to deploy the selected branch on demand
Pushing commits to GitHub on the master
branch will trigger GitHub actions to push your files to Fly.io and restart the service.
Protip: Use the dot (.) key to open your code in github.dev web-based editor when browsing GitHub!