-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
57 lines (55 loc) · 1.43 KB
/
azure-pipelines.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
schedules:
- cron: 0 */3 * * 1-5
displayName: "Weekday Update"
branches:
include:
- master
always: true
jobs:
- job: build
displayName: "Build site"
pool:
vmImage: "windows-2019"
variables:
FAKE_DETAILED_ERRORS: 'true'
steps:
- task: UseDotNet@2
displayName: "Use .NET"
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: DotNetCoreCLI@2
displayName: "Configure secrets"
inputs:
command: 'run'
arguments: '-- -t configure -- $(GitHub.ClientId) $(GitHub.ClientSecret)'
- task: DotNetCoreCLI@2
displayName: "Generate site"
inputs:
command: 'run'
arguments: '-- -t generate'
- publish: $(Build.SourcesDirectory)/public
artifact: public
- deployment: netlify
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: "Netlify Deploy"
pool:
vmImage: "ubuntu-latest"
environment: netlify-prod
dependsOn: [ build ]
strategy:
runOnce:
deploy:
steps:
- task: Npm@1
displayName: "Install Netlify"
inputs:
command: custom
customCommand: install netlify-cli
- download: current
artifact: public
- script: npx netlify deploy --prod --dir $(Pipeline.Workspace)/public
displayName: "Netlify Deploy"
env:
NETLIFY_AUTH_TOKEN: $(Netlify.Token)
NETLIFY_SITE_ID: $(Netlify.SiteId)