git action test #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 |