-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (47 loc) · 1.62 KB
/
deploy-integration-to-azure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy integration to Azure
run-name: Triggered for branch/tag ${{ github.ref }}
env:
AZURE_WEBAPP_NAME: benchscape-integration
AZURE_PUBLISH_PROFILE: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_BENCHSCAPE_INTEGRATION }}
AZURE_FRONTEND_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BENCHSCAPE_INTEGRATION }}
JAVA_VERSION: '17'
DISTRIBUTION: temurin
FRONTEND_LOCATION: "jmh-frontend/src/main/frontend/build"
SERVER_LOCATION: "${{ github.workspace }}/jmh-store/target/*.jar"
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Java version
uses: actions/[email protected]
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.DISTRIBUTION }}
cache: 'maven'
- name: Set up npm cache
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build with Maven
run: mvn verify
- name: Upload Server to Azure
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ env.AZURE_PUBLISH_PROFILE }}
package: ${{ env.SERVER_LOCATION }}
- name: Upload Frontend to Azure
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ env.AZURE_FRONTEND_TOKEN }}
action: "upload"
skip_app_build: true
app_location: ${{ env.FRONTEND_LOCATION }}