Hello,
I’m trying to deploy an Astro framework test app to Fly.io via GitHub actions to see if I can make this type of deployment work for me.
Your docs and YouTube videos make it seem like all I need to do is download the latest Fly.io flyctl
for the command line, do a $ fly launch
from my apps local directory on my computer and it should deploy and I should see a Web App, right?
Um, no.
Nothing could be futher from the truth.
First, let me say, my Astro app is running fine — it works great on my local machine. It was from a course I took on Astro. So the problem is not my app (done mostly in Astro, React & TypeScript). You can download the repository and run it yourself here on GitHub.
However, I keep running into one nickel-and-dime error after another with flyctl
from Fly.io and GitHub actions in what is supposed to be a simple launch of my Astro app on Fly.io.
When I first tried with the $ flyctl launch
in my Astro app directory, there were nothing but errors, seemingly about the Docker container flyctl
made for it.
After that, I noticed it had installed the fly.toml in my Astro app directory and in that .github/workflows/
it had installed a fly-deploy.toml
to work with the GitHub Actions to continuously deploy to Fly.io. Which would be nice, except the first attempt with the $ flyctl launch
never worked properly or produced an app website on my Fly.io account.
I also had big problems creating the FLY_API_TOKEN
and putting it in the Settings > Security > Secrets for that repository, but with help here in the community forums (thanks for that), I was finally able to get that created and put in the right place — you can see that discussion here.
Now I’m beyond that FLY_API_TOKEN
error, but I’m still getting errors deploying via GitHub Actions.
The latest error trace was very long and I didn’t want to put it all here, so you can view in this GitHub Gist I created here. Basically, it basically is erroring out several times, giving me errors and warnings on vars and TypeScript interfaces in my Astro app code that it says are unused
.
Why? Why, why, why, why, why, why, WHY⁉️ Why would Fly.io give a hoot if my vars and TypeScript Types are used or unused or whatever if the app runs fine⁉️ This seems to be, to me, highly intrusive and unnecessary. My code runs fine and is not malware, a security risk nor a danger. It a simple Astro framework test app.
I just want my Astro app deployed on Fly.io. It runs fine. I could Docker containerize it myself, but I thought that was what Fly.io through its $ flyctl launch
was supposed to do for me, to make it all easy?
This is really feeling like a lot of Fly.io and its documentation are not ready for prime time.
Here is the .github/workflows/fly-deploy.toml
that the $ flyctl launch
created for me —
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
If someone would please tell me what I need to do, fix, or change here to get this Astro app to deploy to Fly.io via GitHub Actions, I would greatly appreciate it.
best,
Faddah Wolf
Portland, Oreogn, U.S.