Skip to content

Workflow file for this run

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: "20"
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