add contents for mdbook

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2022-12-23 15:52:09 -05:00
parent 68303e99b8
commit 598a15c814
19 changed files with 366 additions and 14 deletions

37
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: CI (Pull Request)
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@mdbook
- name: check and build
run: cargo x ci
- uses: actions/upload-pages-artifact@v1
with:
path: mini-lsm-book/book
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

20
.github/workflows/pr.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: CI (Pull Request)
on:
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@mdbook
- name: check and build
run: cargo x ci