fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

UebelAndreUpdated docs to use mdbook (#2834)e9798827

main
1.1 KiB38 linesraw
1name: Docs-CI/CD
2
3on:
4  push:
5    branches:
6      - main
7  pull_request:
8    types:
9      - opened
10      - synchronize
11
12jobs:
13  docs:
14    name: Docs
15    runs-on: ubuntu-latest
16    steps:
17      - uses: actions/checkout@master
18      - name: Install Rust
19        run: |
20          rustup set profile minimal
21          rustup toolchain install stable
22          rustup default stable
23      - name: Install latest mdbook
24        run: |
25          tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
26          url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
27          mkdir bin
28          curl -sSL $url | tar -xz --directory=bin
29          echo "$(pwd)/bin" >> $GITHUB_PATH
30      - name: Run tests
31        run: mdbook build
32        working-directory: docs
33      - name: Deploy to GitHub Pages
34        if: github.ref == 'refs/heads/main'
35        uses: JamesIves/github-pages-deploy-action@4.1.7
36        with:
37          branch: gh-pages # The branch the action should deploy to.
38          folder: docs/book # The folder the action should deploy.