-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.12 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
name: Deploy Spring Boot App
on: [push]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
test:
name: Test Application
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21' # Specify Java version 21
distribution: 'temurin' # Using Temurin distribution
cache: maven
- name: Build and Test with Maven
run: mvn clean test # Run your tests
deploy:
name: Deploy App
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
# Set up Flyctl
- uses: superfly/flyctl-actions/setup-flyctl@master
# Deploy Spring Boot Backend
- name: Deploy Spring Boot App
run: |
flyctl deploy --remote-only
badges:
name: Badge Generation
runs-on: ubuntu-latest
steps:
- name: Generate Badges
uses: 3nity/ci-badges@v1
with:
repo: ${{ github.repository }}
workflow: main.yml
jobs: |
test
deploy