From 8dd3c31306626110ac238e7bd4047fe31233f873 Mon Sep 17 00:00:00 2001 From: sarthak Date: Wed, 27 Nov 2024 10:58:32 -0800 Subject: [PATCH 1/2] add workflow --- .github/workflows/fly-review.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/fly-review.yml diff --git a/.github/workflows/fly-review.yml b/.github/workflows/fly-review.yml new file mode 100644 index 0000000..57edb82 --- /dev/null +++ b/.github/workflows/fly-review.yml @@ -0,0 +1,35 @@ +name: Deploy Review App +on: + # Run this workflow on every PR event. Existing review apps will be updated when the PR is updated. + pull_request: + types: [opened, reopened, synchronize, closed] + +env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + # Set these to your Fly.io organization and preferred region. + FLY_REGION: iad + FLY_ORG: personal + +jobs: + review_app: + runs-on: ubuntu-latest + outputs: + url: ${{ steps.deploy.outputs.url }} + # Only run one deployment at a time per PR. + concurrency: + group: pr-${{ github.event.number }} + + # Deploying apps with this "review" environment allows the URL for the app to be displayed in the PR UI. + # Feel free to change the name of this environment. + environment: + name: review + # The script in the `deploy` sets the URL output for each review app. + url: ${{ steps.deploy.outputs.url }} + steps: + - name: Get code + uses: actions/checkout@v4 + + - name: Deploy PR app to Fly.io + id: deploy + uses: superfly/fly-pr-review-apps@1.2.1 + From 813a740326cd9eb5d106f3a46d63e761c5fde9bf Mon Sep 17 00:00:00 2001 From: sarthak Date: Wed, 27 Nov 2024 11:00:42 -0800 Subject: [PATCH 2/2] fix workflow --- .github/workflows/fly-review.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/fly-review.yml b/.github/workflows/fly-review.yml index 57edb82..1311a64 100644 --- a/.github/workflows/fly-review.yml +++ b/.github/workflows/fly-review.yml @@ -7,8 +7,6 @@ on: env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} # Set these to your Fly.io organization and preferred region. - FLY_REGION: iad - FLY_ORG: personal jobs: review_app: