Skip to content

Commit 6660c17

Browse files
committed
Added GitHub action to start preview app.
1 parent 06c5cb1 commit 6660c17

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Start preview app
2+
3+
on:
4+
pull_request:
5+
types: [labeled, synchronize, opened, reopened, close]
6+
paths-ignore:
7+
- 'docs/**'
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-pr-${{ github.event.number }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
env:
17+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
18+
FLY_REGION: waw
19+
FLY_ORG: personal
20+
21+
jobs:
22+
preview-app:
23+
if: contains(github.event.pull_request.labels.*.name, 'PR preview app')
24+
runs-on: ubuntu-latest
25+
name: Preview app
26+
environment:
27+
name: pr-${{github.event.number }}
28+
url: ${{ steps.deploy.outputs.url }}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Deploy preview app
33+
uses: superfly/[email protected]
34+
id: deploy

django/views/templates/default_urlconf.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
<path class="flame" d="M250.27 178.834l-5.32-8.93s-2.47-5.7 3.458-6.118h10.26s6.232.266 3.306 6.194l-5.244 8.93s-3.23 4.37-6.46 0v-.076z" fill="#AA2247"/>
219219
</svg>
220220
<h1>{% translate "The install worked successfully! Congratulations!" %}</h1>
221+
<h2>🎈 This is PR preview app, started on Fly.io 🎈<h2>
221222
<p>{% blocktranslate %}You are seeing this page because <a href="https://docs.djangoproject.com/en/{{ version }}/ref/settings/#debug" target="_blank" rel="noopener">DEBUG=True</a> is in your settings file and you have not configured any URLs.{% endblocktranslate %}</p>
222223
</main>
223224
<footer>

0 commit comments

Comments
 (0)