-
Notifications
You must be signed in to change notification settings - Fork 88
31 lines (29 loc) · 1.21 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
test:
name: build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: |
tag=$(curl -LsSf https://api.github.com/repos/rust-lang/mdBook/releases/latest | jq -r '.tag_name')
curl -LsSf https://github.com/rust-lang/mdBook/releases/download/$tag/mdbook-$tag-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
tag=$(curl -LsSf https://api.github.com/repos/badboy/mdbook-mermaid/releases/latest | jq -r '.tag_name')
curl -LsSf https://github.com/badboy/mdbook-mermaid/releases/download/$tag/mdbook-mermaid-$tag-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
echo $(pwd) >> $GITHUB_PATH
- run: mdbook build
- name: Configure git
run: |
git config --global http.postBuffer 50000000
git config --global https.postBuffer 50000000
- uses: rust-lang/simpleinfra/github-actions/static-websites@master
with:
deploy_dir: book
github_token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang'