mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 21:18:01 +08:00
4366c2dd6c
* update azure * typo
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Ant Design
|
|
|
|
trigger: none
|
|
|
|
pr:
|
|
autoCancel: true
|
|
branches:
|
|
exclude:
|
|
- gh-pages
|
|
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
stages:
|
|
- stage: site
|
|
jobs:
|
|
- job: Build_Site
|
|
steps:
|
|
- checkout: self
|
|
displayName: 'Checkout'
|
|
clean: true
|
|
fetchDepth: 1
|
|
- task: NodeTool@0
|
|
displayName: 'Install Node.js'
|
|
inputs:
|
|
versionSpec: '12.13.1'
|
|
- script: npm install
|
|
displayName: 'Install modules'
|
|
- script: npm run site
|
|
displayName: 'Build sites'
|
|
- script: ls -al _site/
|
|
displayName: 'List build'
|
|
- script: |
|
|
export DEPLOY_DOMAIN=https://preview-${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}-ant-design.surge.sh
|
|
echo "Deploy to $DEPLOY_DOMAIN"
|
|
npx surge --project ./_site --domain $DEPLOY_DOMAIN
|
|
curl -X POST -u ${ACCESS_TOKEN} -H "Accept: application/json" -H "Content-Type:application/json" https://api.github.com/repos/ant-design/ant-design/issues/${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}/comments -d '{ "body": "Preview deploy to '${DEPLOY_DOMAIN}'" }'
|
|
displayName: 'Deploy Site' |