From a00e949fa9702b898b5d096167bcc2625a6a3ed2 Mon Sep 17 00:00:00 2001 From: JasterV <49537445+JasterV@users.noreply.github.com> Date: Tue, 13 Jan 2026 14:11:42 +0100 Subject: [PATCH] feat: add a fly-review.yml action & update release file --- .github/workflows/fly-review.yml | 34 ++++++++++++++++++++++++++++++++ lib/spazio_solazzo/release.ex | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) 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..379ee40 --- /dev/null +++ b/.github/workflows/fly-review.yml @@ -0,0 +1,34 @@ +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 }} + FLY_REGION: ams + 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.0 diff --git a/lib/spazio_solazzo/release.ex b/lib/spazio_solazzo/release.ex index 94df41a..789f05c 100644 --- a/lib/spazio_solazzo/release.ex +++ b/lib/spazio_solazzo/release.ex @@ -20,7 +20,7 @@ defmodule SpazioSolazzo.Release do def seed do load_app() - {:ok, _} = Application.ensure_all_started(@app) + Application.ensure_all_started(@app) for _repo <- repos() do seed_file = Application.app_dir(@app, "priv/repo/seeds.exs")