Skip to content

dentarg/fly

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

fly

dentarg/fly is an composite run steps action that deploys your app to Fly.

The Fly Personal Access Token (FLY_API_TOKEN) needs to be saved as a secret in GitHub Actions. Use fly auth token to get a token or generate one from the Fly dashboard.

If you pass github-token, the action will create deployments in your repository. When you use this, the workflow needs not to be triggered by the push event to work. See the example below.

The example workflow below deploys the app when the CI workflow ran succesfully against the default branch.

name: Deploy

on:
  workflow_run:
    workflows: [CI]
    types: [completed]

jobs:
  deploy:
    if: |
      github.event.workflow_run.conclusion == 'success' &&
      github.event.workflow_run.head_branch == github.event.repository.default_branch
    concurrency: deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: |
          echo "RUBY_VERSION=$(cat .ruby-version)" >> $GITHUB_ENV
      - uses: dentarg/fly@v1
        with:
          build-args: "RUBY_VERSION=${{ env.RUBY_VERSION }}"
          fly-token: ${{ secrets.FLY_API_TOKEN }}
          github-token: ${{ secrets.GITHUB_TOKEN }}

About

Deploy your app to Fly.io with Github Actions

Resources

Stars

Watchers

Forks

Packages

No packages published