Innacurate Guide

I am following the Guide posted here Continuous Deployment with Fly and GitHub Actions · Fly Docs

There are a couple of problems I notice:

First on the repository they suggest we can clone to start working with, there is no .gitignore file. (No big deal, as it’s only pointed in the documentation, so we remove the ignore of fly.toml file.

The other problem, it mentions to use the command flyctl create app so a fly.toml file is created, but, after running this command, there is no fly.toml file created.

I’m wondering if things changed, or if there are steps missing.

PS: running flyctl launch does create the fly.toml file.

1 Like

PS: Also, once I get it “working” there is an error on the action that says:

**Error:** .github#L1

No event triggers defined in `on`

Well turns out the issue is the formatting on the yaml file.

There correct indentation would be:

name: Fly Deploy
on:
  push:
    branches:
      - master
env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
  deploy:
    name: Deploy app
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: superfly/flyctl-actions/setup-flyctl@master
      - run: flyctl deploy --remote-only

PS: Also one important thing to mention would be that the user should check the branch name to make sure it matches the branch they want to deploy.

Hi,

I created a pull request which should fix the issues.

Yep, their go example repo uses master, not main, and so the action would not trigger without that being updated.

The YAML formatting is indeed wrong on the site … but it looks correct in the markdown. So not quite sure how that is getting mangled. I copied it again directly from VSCode and confirmed it works in Github. So we’ll see.

2 Likes