-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.59 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
MDBOOK_VERSION: v0.4.18
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install nightly -c rust-docs
rustup default nightly
- name: Install linkcheck
run: |
curl -sSLo linkcheck.sh \
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
- name: Install mdBook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/$MDBOOK_VERSION/mdbook-$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "`pwd`/bin" >> $GITHUB_PATH
- name: Report versions
run: |
mdbook -V
rustup -V
- name: Build & Run linkcheck
run: sh linkcheck.sh book
deploy:
needs: [check]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v3
- name: Install mdBook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/$MDBOOK_VERSION/mdbook-$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "`pwd`/bin" >> $GITHUB_PATH
- name: Build the book
run: mdbook build
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
cname: actoromicon.rs