Skip to content

Commit 01c176b

Browse files
committed
get mdbook building in CI script
1 parent 2e25bd0 commit 01c176b

File tree

6 files changed

+82
-5
lines changed

6 files changed

+82
-5
lines changed

.github/workflows/upload.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Upload
33
on:
44
push:
55
branches:
6-
- master
76
- main
87
pull_request: {}
98

@@ -67,3 +66,36 @@ jobs:
6766

6867
- name: Display status from deploy
6968
run: echo "${{ steps.deploy.outputs.status }}"
69+
70+
71+
# also need to upload mddook
72+
73+
- name: curl mdbook.tar.gz
74+
run: curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz > ./mdbook.tar.gz
75+
76+
- name: curl linkcheck
77+
run: curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.6/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip > ./linkcheck.zip
78+
79+
- name: tar mdbook
80+
run: tar -zxvf ./mdbook.tar.gz && unzip -n ./linkcheck.zip && chmod +x mdbook-linkcheck
81+
82+
- name: trick path
83+
run: echo "::add-path::$GITHUB_WORKSPACE/"
84+
85+
- name: mdbook build
86+
run: ./mdbook build && mv -v book/html/index.html book/html/mdbook.html
87+
88+
- name: Deploy to server
89+
id: deploy-mdbook
90+
uses: Pendect/action-rsyncer@v1.1.0
91+
env:
92+
DEPLOY_KEY: ${{secrets.rsync_private_key}}
93+
with:
94+
flags: '-avzr --progress'
95+
options: ''
96+
ssh_options: ''
97+
src: 'book/html/*'
98+
dest: 'rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}'
99+
100+
- name: Display status from deploy
101+
run: echo "${{ steps.deploy.outputs.status }}"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
js-out/
66
node_modules/
77
dist/
8+
9+
book/

book.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
[book]
3+
title = "Calcit Docs"
4+
authors = [ "tiye" ]
5+
src = "docs"
6+
7+
[output.html]
8+
9+
[output.linkcheck]
10+
11+
[build]
12+
create-missing = false

calcit.cirru

Lines changed: 23 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compact.cirru

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@
7878
{} (:padding "\"0 8px") (:width "\"20%") (:min-width 266) (:background-color :white)
7979
:border-right $ str "\"1px solid " (hsl 0 0 94)
8080
div
81-
{} $ :on-click
82-
fn (e d!) (.show quick-modal d!)
83-
<> "\"Quick Search" $ {} (:cursor :pointer)
81+
{}
82+
:style $ {} (:position :absolute) (:right 8) (:top 4)
83+
:on-click $ fn (e d!) (.show quick-modal d!)
84+
<> "\"Quick Jump" $ {} (:cursor :pointer) (:font-family ui/font-fancy)
8485
div
8586
{} $ :style
8687
{} $ :margin-top 12

docs/SUMMARY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Calcit Docs
2+
3+
- [Guide](guide.md)
4+
- [Design](design.md)
5+
- [Guide](guide.md)
6+
- [Design](design.md)
7+
- [Overview](overview.md)
8+
- [About](about.md)

0 commit comments

Comments
 (0)