-
-
Notifications
You must be signed in to change notification settings - Fork 11
130 lines (114 loc) · 3.63 KB
/
DeployVisualAPI.yml
File metadata and controls
130 lines (114 loc) · 3.63 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy to VisualAPI
on:
workflow_run:
workflows: ["Build nuget dotnet programmer all"]
types:
- completed
# on:
# push:
# tags:
# - "vAPI*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
# strategy:
# matrix:
# node-version: [16.13.0]
steps:
- uses: actions/checkout@v2
# - name: Node ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
- name: Download artifact main site
id: download-artifact-main
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: deployVersion.yml
name: releaseBlocklyAutomation
workflow_conclusion: success
path: ${{github.workspace}}/src/react_new_app/my-app/build/
if_no_artifact_found: fail
- name: Download artifact
id: download-artifact-docs-localAPI
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: deployVersion.yml
#name: localAPIDocs
name: releaseBlocklyAutomation
workflow_conclusion: success
path: ${{github.workspace}}/src/react_new_app/my-app/build/help/
if_no_artifact_found: fail
- name: verify exists
run: |
ls -l ${{github.workspace}}/src/react_new_app/my-app/build/
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: false
# - name: npm install
# run: |
# cd src
# cd react_new_app
# cd my-app
# npm i -g npm@8.1.0
# npm i
# - name: build site
# run: |
# cd src
# cd react_new_app
# cd my-app
# npm run build
- name: Build with dotnet
run: |
cd src
cd apps
cd TestDataNetCoreBlocklyAPI
cd TestDataNetCoreBlocklyAPI
cd wwwroot
rm -rf BlocklyAutomation
mkdir BlocklyAutomation
cp -R ${{github.workspace}}/src/react_new_app/my-app/build/* BlocklyAutomation
cd ..
cd ..
ls -l
dotnet build --configuration Release
- name: dotnet publish
run: |
cd src
cd apps
cd TestDataNetCoreBlocklyAPI
cd TestDataNetCoreBlocklyAPI
dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'VisualAPI'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_29F69EA3E2E84928B72267B575A267E7 }}
package: .