-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1.11 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
name: Docs
on:
push:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: install mdbook
run: curl https://github.com/rust-lang/mdBook/releases/download/v0.4.43/mdbook-v0.4.43-x86_64-unknown-linux-gnu.tar.gz -L | tar -xz
- run: mv docs/theme/{prod-,}toc.js.hbs
- run: ../mdbook build
working-directory: docs
- run: find docs/book -iname '*.html' -exec sed -e 's#\.html##g' -e 's#/index#/#g' -i -- {} ';'
- if: github.ref_name == 'main'
uses: actions/configure-pages@v3
- if: github.ref_name == 'main'
uses: actions/upload-pages-artifact@v2
with:
path: docs/static
- if: github.ref_name == 'main'
uses: actions/deploy-pages@v1
- run: rm docs/static/docs; mv docs/book docs/static/docs
- if: github.ref_name != 'main'
uses: denoland/deployctl@v1
with:
project: vine-dev
root: docs/static
entrypoint: https://deno.land/std/http/file_server.ts