From 764f7f61ff389d65ac7291643025a7f43fe7d610 Mon Sep 17 00:00:00 2001 From: Nicola Zambello Date: Fri, 11 Feb 2022 13:15:34 +0100 Subject: [PATCH] ci: update deploy wf --- .github/workflows/main.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5047d5..72e096b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,14 +1,24 @@ -name: Fly Deploy -on: [push] -env: - FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} +name: 🚀 Deploy +on: + push: + branches: + - main + pull_request: {} + jobs: deploy: - name: Deploy app - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: superfly/flyctl-actions@1.1 - with: - args: "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 }}