Deployment
Github Actions
Use Github Actions for easy updates
This guide will walk you through the process of setting up a GitHub Actions to easily deploy updates for your Remix app to Fly.io.
Prerequisites
- A Fly.io account
- A GitHub repository with a fork of the boringdatabase repository.
- Flyctl CLI installed and authenticated on your local machine
Steps
1. Generate a Fly.io Access Token
-
Open your terminal at root of the boringdatabase repository
-
Run the following command:
You can also create a deploy token via the fly dashboard https://fly.io/apps/{your-app-name}/tokens
-
Copy the generated token
2. Add the Token to GitHub Secrets
- Go to your GitHub repository
- Click on “Settings” > “Secrets and variables” > “Actions”
- Click “New repository secret”
- Name:
FLY_API_TOKEN
- Value: Paste the token you copied earlier
- Click “Add secret”
3. View your GitHub Workflow File
- In your repository, you will find
.github/workflows/main.yml
- Uncomment the Deploy Production step!
Github will automatically inject your FLY_API_TOKEN during the deploy stage
4. Commit and Push
- Commit the changes in your workflow to git.
6. Monitor Deployment
- Go to your GitHub repository
- Click on the “Actions” tab
- You should see the “Fly Deploy” workflow running
Troubleshooting
- If the deployment fails, check the workflow logs in the GitHub Actions tab
- Ensure your
fly.toml
file is correctly configured - Verify that your Fly.io account has the necessary permissions and resources