-
-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (45 loc) · 1.52 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 🚀 Deploy to Fly
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group
permissions:
deployments: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Fly 🧰
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Create GitHub deployment 🐙
uses: chrnorm/deployment-action@v2
id: deployment
with:
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
environment-url: http://api.web-check.xyz
environment: production
- name: Deploy to Fly.io 🛩️
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}
- name: Update deployment status (success) ✅
if: success()
uses: chrnorm/deployment-status@v2
with:
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: 'success'
- name: Update deployment status (failure) ❌
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: 'failure'