-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2578a1c
commit 8dd3c31
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
|