summaryrefslogtreecommitdiffstats
path: root/third_party/rust/mio/ci/azure-deploy-docs.yml
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/mio/ci/azure-deploy-docs.yml')
-rw-r--r--third_party/rust/mio/ci/azure-deploy-docs.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/third_party/rust/mio/ci/azure-deploy-docs.yml b/third_party/rust/mio/ci/azure-deploy-docs.yml
new file mode 100644
index 0000000000..2ff0f2a06e
--- /dev/null
+++ b/third_party/rust/mio/ci/azure-deploy-docs.yml
@@ -0,0 +1,39 @@
+parameters:
+ dependsOn: []
+
+jobs:
+- job: documentation
+ displayName: 'Deploy API Documentation'
+ condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
+ pool:
+ vmImage: 'Ubuntu 16.04'
+ dependsOn:
+ - ${{ parameters.dependsOn }}
+ steps:
+ - template: azure-install-rust.yml
+ parameters:
+ rust_version: stable
+ - script: |
+ cargo doc --no-deps
+ cp -R target/doc '$(Build.BinariesDirectory)'
+ displayName: 'Generate Documentation'
+ - script: |
+ set -e
+
+ git --version
+ ls -la
+ git init
+ git config user.name 'Deployment Bot (from Azure Pipelines)'
+ git config user.email 'deploy@tokio-rs.com'
+ git config --global credential.helper 'store --file ~/.my-credentials'
+ printf "protocol=https\nhost=github.com\nusername=carllerche\npassword=%s\n\n" "$GITHUB_TOKEN" | git credential-store --file ~/.my-credentials store
+ git remote add origin https://github.com/tokio-rs/mio
+ git checkout -b gh-pages
+ git add .
+ git commit -m 'Deploy Mio API documentation'
+ git push -f origin gh-pages
+ env:
+ GITHUB_TOKEN: $(githubPersonalToken)
+ workingDirectory: '$(Build.BinariesDirectory)'
+ displayName: 'Deploy Documentation'
+