name: 🚀 Deploy
on:
  push:
    branches:
      - main
  pull_request: {}

jobs:
  deploy:
    name: 🚀 Deploy
    runs-on: ubuntu-latest
    # only build/deploy main branch on pushes
    if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}

    steps:
      - name: ⬇️ Checkout repo
        uses: actions/checkout@v2

      - name: 🚀 Deploy
        uses: superfly/flyctl-actions@1.1
        with:
          args: "deploy --remote-only"
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
