-
-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (46 loc) · 1.35 KB
/
build.yaml
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
name: Build
on:
push:
branches: ["**"]
tags-ignore: ["**"]
paths-ignore:
- LICENSE-Apache
- LICENSE-MIT
pull_request:
paths-ignore:
- LICENSE-Apache
- LICENSE-MIT
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Check for typos
uses: crate-ci/typos@master
- name: Install mdbook
run: |
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.7/mdbook-v0.4.7-x86_64-unknown-linux-gnu.tar.gz -O - | tar -xz
mkdir mdbook-path
mv mdbook mdbook-path
echo "$(pwd)/mdbook-path" >> $GITHUB_PATH
- name: Build diagrams
run: |
pip install -r diagrams/requirements.txt
mkdir src/diagrams
python diagrams/diagrams.py
- name: Build
run: mdbook build
- name: Publish internal docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: main
folder: book
target-folder: book
repository-name: time-rs/time-rs.github.io
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)