mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 06:45:49 +00:00
Create workflow.yml
This commit is contained in:
parent
ac3e64208e
commit
e8d8b995c5
1 changed files with 39 additions and 0 deletions
39
.github/workflows/workflow.yml
vendored
Normal file
39
.github/workflows/workflow.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: Deploy Java app to Azure Web App
|
||||
|
||||
on:
|
||||
[push]
|
||||
|
||||
# CONFIGURATION
|
||||
# For help, go to https://github.com/Azure/Actions
|
||||
#
|
||||
# 1. Set up the following secrets in your repository:
|
||||
# AZURE_WEBAPP_PUBLISH_PROFILE
|
||||
#
|
||||
# 2. Change these variables for your configuration:
|
||||
env:
|
||||
AZURE_WEBAPP_NAME: JavaSpringPetclinic # set this to your application's name
|
||||
AZURE_WEBAPP_PACKAGE_PATH: ${{ github.workspace }} # set this to the path to your web app project
|
||||
JAVA_VERSION: '1.8' # set this to the node version to use
|
||||
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} # set GH repo secret with the publish profile of the web app
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
name: Build and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- name: Build with Maven
|
||||
run: mvn package --file pom.xml
|
||||
- name: 'Deploy to Azure WebApp'
|
||||
uses: azure/webapps-deploy@v1
|
||||
with:
|
||||
app-name: ${{ env.AZURE_WEBAPP_NAME }}
|
||||
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
|
||||
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/target/*.jar'
|
||||
|
||||
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
|
||||
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
|
Loading…
Reference in a new issue