-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.42 KB
/
main.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
51
52
53
name: Compile/Deploy Native Image To Fly.io
# Controls when the action will run.
env:
FLY_API_TOKEN: ${{ secrets.FLY_AUTH }}
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [main]
# Your workflows jobs.
jobs:
Build-Compile-Deploy:
environment: manga-spring.com
concurrency:
group: concurrency-group-1
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: "21"
java-package: jdk
architecture: x64
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Maven Dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-mvn-
- name: Build Artifact
run: mvn clean package
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Multi-Stage Docker Build And Deploy
run: flyctl deploy
- name: Check the deployed service URL
uses: jtalk/url-health-check-action@v2
with:
url: https://www.manga-spring.com/home
follow-redirect: true
max-attempts: 3
retry-delay: 5s
retry-all: false