Hi. So I have a Github Repo where I have a client and api directory in the root of the project. I First deployed the API directory to FLY using the FLY CLI, hence the fly.toml and the Dockerfile were created inside the API folder.
I’m now trying to create a GitHub Action workflow for CD, but I’m getting errors mainly because of the path. At first I was getting an error that the config file didn’t have an APP Name.
‘Error: the config for your app is missing an app name, add an app field to the fly.toml file or specify with the -a flag’
I fixed this error by providing the correct path to the fly.toml file in the workflow.
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --config ./api/fly.toml --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
But now I’m getting the following error message:
Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See Fly Launch configuration (fly.toml) · Fly Docs
Is there a way to configure the API path in the workflow file so that it looks in there for all the files needed?
Any help would be greatly appreciated.