deploy #42
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 to Google Cloud | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
- name: Build the Spring Boot Application | |
run: mvn -B package --file pom.xml | |
working-directory: ${{ github.workspace }}/your-spring-boot-app-directory | |
- name: Deploy to Google Cloud App Engine | |
uses: google-github-actions/deploy-appengine@v0.2.0 | |
with: | |
credentials: ${{ secrets.GCP_SA_KEY }} | |
project_id: ${{ secrets.GCP_PROJECT }} | |
deliverables: ${{ github.workspace }}/your-spring-boot-app-directory/target/your-spring-boot-app.jar |