Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Update main_onna.yml #2

Update main_onna.yml

Update main_onna.yml #2

Workflow file for this run

name: Build and deploy JAR app to Azure Web App - onna
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java version
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: '8.0'
- name: Build with Gradle
run: ./gradlew build
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: java-app
path: 'onna-server/build/libs/*.jar'
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: java-app
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'onna'
slot-name: 'Production'
package: 'onna-server/build/libs/*.jar'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D04B2FA0C49A43908FE2C03A2EE374BD }}