Skip to content

Deploy from CI

Deploy from CI #1

name: Build and deploy
on:
push:
branches:
- main
jobs:
build:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
- name: Build
run: ./gradlew build
- name: Set up Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy
run: |
az spring app deploy \
--name calendar \
--service spring-team \
--resource-group spring-team \
--artifact-path build/libs/spring-calendar.jar