name: Fly.io Deploy

on:
  workflow_run:
    workflows: ["Docker CI"]
    types: 
      - completed

env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

jobs:
  deploy:
      name: Deploy app
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: superfly/flyctl-actions@1.1
          with:
            args: "deploy --detach"
