-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 957 Bytes
/
mdbook.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
name: mdbook
on:
push:
branches:
- main
- dev
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Dependencies
run: |
npm install -g pagecrypt surge
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build docs
run: mdbook build ./docs
- name: Password protect docs
run: |
for f in $(find ./docs/book -name '*.html'); do pagecrypt $f $f ctrlplane; done
- name: Deploy docs
run: surge ./docs/book small-thought.surge.sh --token c05963fcb7455e0ec3008d27dc4d6816