• TypeScript 74.7%
  • Shell 20.1%
  • Dockerfile 5.2%
Find a file
Liam Bigelow ed8efb3383
Merge pull request #108 from p-j/chore/upgrade-node-runtime
chore(setup): update nodejs runtime
2026-04-08 12:19:48 +12:00
.github Revamp 2024-08-03 01:57:23 +09:00
setup-flyctl rebuild dist from clean install 2026-04-08 12:10:20 +12:00
.gitattributes Revamp 2024-08-03 01:57:23 +09:00
action.yml Update action.yml 2020-01-29 10:19:14 -08:00
Dockerfile Update download url 2020-06-18 11:36:33 -05:00
entrypoint.sh Merge pull request #14 from kulor/master 2022-02-04 23:47:45 +01:00
LICENSE Initial commit 2019-09-19 14:55:35 -05:00
README.md fix link 2023-02-17 11:34:05 +01:00

Automate Fly.io app deployment

This action wraps the Fly.io CLI. Use it to deploy or manage your Fly.io application via Github Actions events.

Usage for Deployment

Tip

For production deployments, pin flyctl to a specific version to avoid unexpected behavior in edge releases.

name: Deploy to Fly
on: [push]
jobs:
  deploy:
    name: Deploy proxy
    runs-on: ubuntu-latest
    steps:
      # This step checks out a copy of your repository.
      - uses: actions/checkout@v2
      - uses: superfly/flyctl-actions/setup-flyctl@master
      - run: flyctl deploy --remote-only
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

Pin to a specific version of flyctl:

- uses: superfly/flyctl-actions/setup-flyctl@master
  with:
    version: 0.0.462

Running one-off scripts

name: Run on Fly
on: [push]
jobs:
  deploy:
    name: Run script
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: superfly/flyctl-actions/setup-flyctl@master
      - run: "flyctl ssh console --command 'sh ./myscript.sh'"
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

See the flyctl GitHub project for more information on using flyctl.

Secrets

FLY_API_TOKEN - Required. The token to use for authentication. You can find a token by running flyctl auth token or going to your user settings on fly.io.

Using the setup-flyctl action

This documentation only covers usage of the setup-flyctl action. The main action in this repository runs more slowly inside Docker, so is not recommended. It's been kept in place since many CI pipelines are still using it.