Fly,io won't deploy via GitHub Actions — has a problem with my unused vars?!?!

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.

Just to give a counter example anecdote, I was debugging some Astro issues last week and fly launch deploy the Astro apps w/o any issues. It was as simple as the docs and videos described.

Maybe you can create a min repro so the Fly team can look at it?

@khuezy,

Well, what can I say, except — bully for you, i’m glad you got an Astro app up on Fly.io with no problems. Must be nice.

I, however, cannot, for all the reasons I’ve mentioned above.

And, I already gave the GitHub web address to my repository above :point_up:here’s the GitHub Repository again. You can download it yourself and try to launch up to Fly.io, so can the “Fly team,” as you put it.

I appreciate your reply, but it addresses none of my issues and I’m still unable to deploy to GitHub actions and still need help to get this fixed.

best,

Faddah Wolf
Portland, Oreogn, U.S.

6/10 for the rant, but it’s misplaced here as it has nothing to do with the platform. Your build script runs astro check, which in turn runs TypeScript’s check which is setup to error on unused variables. On every machine, regardless of GitHub Actions or Fly.

1 Like

:laughing: I was not bullying you. If you want me to bull you, here:

You need to be more detail oriented. :facepunch:

Unless there’s a Portland, Oreogn I don’t know of… you have a typo in your signature.
Now give me your lunch :money_with_wings:

@khuezy — “bully for you” is a phrase we older (i’m 64) folk know that you may not. It’s a cheer, like “Rah! Rah!,” or “Sis-boom-bah!” or “Go Team!” I was not saying you were “bullying” me. that is something entirely different.

@cschmatzler1 — thank you, that at least points me to where I need to be looking. i’m just saying all this, "just do $ flyctl launch stuff, thus far, has not really worked out for me. and the docs here, particularly about creating the FLY_API_TOKEN, are missing quite a bit.

onward.

best,

faddah

1 Like

I’ve never heard of that saying before. Sounds a bit British. I think if you post help threads without being so aggressive towards the platform, it would fare better. You know the saying you come at the King, you best not miss, or if you point your fingers at someone/thing, you have 3 pointing back at you.

My first message was a nice way of saying "user error"

@khuezy

Urban Dictionary is your friend.

best,

Faddah Wolf
Portland, Oregon, U.S.A.

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