Skip to content

Commit

Permalink
Deploy from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Nov 16, 2023
1 parent d985637 commit aa2fec5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 21 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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
21 changes: 0 additions & 21 deletions .github/workflows/deploy.yml

This file was deleted.

0 comments on commit aa2fec5

Please sign in to comment.