Skip to content

Commit 38831bc

Browse files
authored
update in branch preview deployment and fix in pr-close workflow (#10)
* small fix * fix in app_name in workflows * add missing app_name
1 parent ba88dba commit 38831bc

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 🤖 Branch Preview
2+
3+
concurrency:
4+
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [main]
10+
11+
jobs:
12+
deploy:
13+
name: 🚀 Deploy Branch Preview
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: forge-42/fly-deploy@v1.0.0-rc.2
18+
id: deploy
19+
env:
20+
FLY_ORG: ${{ vars.FLY_ORG }}
21+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
22+
FLY_REGION: ${{ vars.FLY_REGION }}
23+
with:
24+
app_name: ${{github.event.repository.name}}-${{ github.ref_name }}
25+
env_vars: |
26+
APP_ENV=staging
27+
GITHUB_OWNER=${{github.repository_owner}}
28+
GITHUB_REPO=${{github.event.repository.name}}
29+
GITHUB_REPO_URL=https://github.com/${{ github.repository }}

.github/workflows/pr-close.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
2525
FLY_ORG: ${{ vars.FLY_ORG }}
2626
with:
27-
app_name: ${{ env.FLY_ORG }}-${{ github.event.number }}
27+
app_name: ${{github.event.repository.name}}-${{ github.event.number }}

fly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# fly.toml app configuration file generated for docs-template-test on 2025-09-12T12:27:12+02:00
1+
# fly.toml app configuration file generated for docs-template-test on 2025-09-19T15:08:49+02:00
22
#
33
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44
#

0 commit comments

Comments
 (0)