This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
70 lines (69 loc) · 2.18 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
58
59
60
61
62
63
64
65
66
67
68
69
70
trigger:
- master
stages:
- stage: Build
jobs:
- job: Source
pool:
vmImage: ubuntu-latest
steps:
- script: npm ci
- script: npm run build
- bash: cp -r cjs esm umd $(Build.ArtifactStagingDirectory)
- upload: $(Build.ArtifactStagingDirectory)
- job: Docs
pool:
vmImage: ubuntu-latest
steps:
- script: npm ci
- script: npm run docs
- upload: docs
artifact: docs
- stage: Deploy
condition: "and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))"
jobs:
- deployment: Docs
environment: github
pool:
vmImage: ubuntu-latest
variables:
- group: GitHub
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: docs
- script: |
git init
git config --local user.name "Azure Pipelines"
git config --local user.email "[email protected]"
git add .
git commit -m "latest docs"
workingDirectory: $(Pipeline.Workspace)/docs
- task: InstallSSHKey@0
inputs:
knownHostsEntry: $(githubKnownHosts)
sshPublicKey: $(githubPublicKey)
sshKeySecureFile: rating-scales_gh-pages
- script: >
git remote add origin
[email protected]:decsys/rating-scales.git
git push origin HEAD:gh-pages -f
workingDirectory: $(Pipeline.Workspace)/docs
- deployment: npm
environment: github
pool:
vmImage: ubuntu-latest
strategy:
runOnce:
deploy:
steps:
- checkout: self
- bash: >-
cp -r $(Pipeline.Workspace)/drop/*
$(System.DefaultWorkingDirectory)
- task: Npm@1
inputs:
command: publish
publishEndpoint: npmjs