@@ -64,27 +64,31 @@ jobs:
64
64
-warnAsError
65
65
66
66
- name : Package Web API
67
+ if : github.ref == 'refs/heads/main'
67
68
working-directory : server
68
69
run : >
69
70
dotnet publish WebApi/WebApi.csproj
70
71
--configuration Release
71
72
--property:PublishDir="../artifacts/api"
72
73
73
74
- name : Package Functions
75
+ if : github.ref == 'refs/heads/main'
74
76
working-directory : server
75
77
run : >
76
78
dotnet publish Functions/Functions.csproj
77
79
--configuration Release
78
80
--property:PublishDir="../artifacts/fns"
79
81
80
82
- name : Save Web API
83
+ if : github.ref == 'refs/heads/main'
81
84
uses : actions/upload-artifact@v4
82
85
with :
83
86
name : api
84
87
path : " server/artifacts/api"
85
88
include-hidden-files : true
86
89
87
90
- name : Save Functions
91
+ if : github.ref == 'refs/heads/main'
88
92
uses : actions/upload-artifact@v4
89
93
with :
90
94
name : fns
@@ -151,12 +155,14 @@ jobs:
151
155
152
156
steps :
153
157
- name : Download Functions package
158
+ if : github.ref == 'refs/heads/main'
154
159
uses : actions/download-artifact@v4
155
160
with :
156
161
name : fns
157
162
path : artifacts/fns
158
163
159
164
- name : Download API package
165
+ if : github.ref == 'refs/heads/main'
160
166
uses : actions/download-artifact@v4
161
167
with :
162
168
name : api
@@ -169,13 +175,15 @@ jobs:
169
175
path : artifacts/web
170
176
171
177
- name : Deploy Functions
178
+ if : github.ref == 'refs/heads/main'
172
179
uses : Azure/functions-action@v1
173
180
with :
174
181
app-name : stock-charts-functions
175
182
package : artifacts/fns
176
183
publish-profile : ${{ secrets.PUBLISH_PROFILE_FNS }}
177
184
178
185
- name : Deploy API
186
+ if : github.ref == 'refs/heads/main'
179
187
uses : azure/webapps-deploy@v3
180
188
with :
181
189
app-name : stock-charts-api
0 commit comments