forked from rustwasm/rustwasm.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
37 lines (36 loc) · 1.22 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
trigger:
- src
jobs:
- job: publish
steps:
- script: |
set -e
curl -L https://github.com/rust-lang-nursery/mdBook/releases/download/v0.2.1/mdbook-v0.2.1-x86_64-unknown-linux-musl.tar.gz | tar xzf -
echo "##vso[task.prependpath]$PWD"
displayName: Install mdbook
- task: UseRubyVersion@0
inputs:
versionSpec: '>= 2.4'
addToPath: true
- script: |
gem install bundler -v 1.16.5 && bundle install --retry=3 --jobs=4
displayName: Install ruby deps
- bash: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "##vso[task.prependpath]$HOME/.cargo/bin"
displayName: Install rust
- script: ./ci/build.sh
displayName: Build site
- script: |
set -e
source ci/setup-git.sh
cd _site
git init
git add .
git commit -m "Deploy $BUILD_SOURCEVERSION"
git push git@github.com:rustwasm/rustwasm.github.io master:master -f
displayName: "Push to gh-pages"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/src'))
env:
GITHUB_DEPLOY_KEY: '$(GITHUB_DEPLOY_KEY)'