Skip to content

Commit 30ae838

Browse files
taylor-shiftcrutchcorn
authored andcommitted
Enabled preview deploys
1 parent 5305253 commit 30ae838

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/fly-review.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Review App
2+
on:
3+
# Run this workflow on every PR event. Existing review apps will be updated when the PR is updated.
4+
pull_request:
5+
types: [opened, reopened, synchronize, closed]
6+
7+
env:
8+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
9+
# Set these to your Fly.io organization and preferred region.
10+
FLY_REGION: iad
11+
FLY_ORG: playful-programming
12+
13+
jobs:
14+
review_app:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
url: ${{ steps.deploy.outputs.url }}
18+
# Only run one deployment at a time per PR.
19+
concurrency:
20+
group: pr-${{ github.event.number }}
21+
22+
# Deploying apps with this "review" environment allows the URL for the app to be displayed in the PR UI.
23+
# Feel free to change the name of this environment.
24+
environment:
25+
name: review
26+
# The script in the `deploy` sets the URL output for each review app.
27+
url: ${{ steps.deploy.outputs.url }}
28+
29+
steps:
30+
- name: Get code
31+
uses: actions/checkout@v4
32+
33+
- name: Deploy PR app to Fly.io
34+
id: deploy
35+
uses: superfly/[email protected]

0 commit comments

Comments
 (0)