-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor-manual-offline.yml
50 lines (46 loc) · 1.65 KB
/
appveyor-manual-offline.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
version: 1.0.{build}
install:
- cmd: >-
dotnet restore
npm install -g bower
build:
verbosity: minimal
after_build:
- cmd: dotnet publish src\CoreWebApplication1 --output %appveyor_build_folder%\dist
artifacts:
- path: dist
name: dist.web
before_deploy:
- ps: >-
$username = "`$ilyaf4"
$password = $env:sitepwd
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$Headers = @{
'Authorization' = ('Basic {0}' -f $base64AuthInfo)
'If-Match' = '*'
}
$apiUrl = "https://ilyaf4.scm.azurewebsites.net/api/vfs/site/wwwroot/app_offline.htm"
$filePath = "app_offline_tmp.htm"
Invoke-RestMethod -Uri $apiUrl -Headers $Headers -Method PUT -InFile $filePath -ContentType "multipart/form-data"
after_deploy:
- ps: >-
$username = "`$ilyaf4"
$password = $env:sitepwd
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$Headers = @{
'Authorization' = ('Basic {0}' -f $base64AuthInfo)
'If-Match' = '*'
}
$apiUrl = "https://ilyaf4.scm.azurewebsites.net/api/vfs/site/wwwroot/app_offline.htm"
Invoke-RestMethod -Uri $apiUrl -Headers $Headers -Method DELETE
deploy:
- provider: WebDeploy
server: https://ilyaf4.scm.azurewebsites.net/msdeploy.axd?site=ilyaf4
website: ilyaf4
username: $ilyaf4
password:
secure: 6Ld20wVhIzLd+G2PlkT90wZuM4DlJLCPy+hslN4FZwlC/+QL7YzpskuA9TOhJRPSFu77ya3d1GhmdBDz7J9WzA==
artifact: dist.web
aspnet_core: true
aspnet_core_force_restart: true
#app_offline: true