-
Notifications
You must be signed in to change notification settings - Fork 52
48 lines (45 loc) · 1.6 KB
/
docs.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
## Uses the deployment flow described here: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-deploy-to-external-repository-external_repository
# The cucapra/calyx-docs repository contains the public deployment key and the main Calyx repository contains the private key enabling it to write to the docs repository.
name: Docs website
on:
push:
branches:
- main
jobs:
playground:
name: Docs website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"
- name: Install callouts preprocessor
run: cargo install --git https://github.com/ToolmanP/rs-mdbook-callouts --rev 83898e352a961fc65044e04c864141c8b5481722
- name: mdbook
run: mdbook build
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.66.0
override: true
components: rustfmt, clippy
- name: Build source documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: -p calyx-ir -p calyx-utils -p calyx-frontend -p calyx-opt --no-deps
- name: Move source documentation
run: |
mv ./target/doc ./book/source
- name: Create CNAME files
run: |
echo 'docs.calyxir.org' > ./book/CNAME
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: main
deploy_key: ${{ secrets.DOCS_DEPLOY_TOKEN }}
external_repository: cucapra/calyx-docs
publish_dir: ./book