-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (44 loc) · 1.32 KB
/
documentation.yml
File metadata and controls
51 lines (44 loc) · 1.32 KB
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
49
50
51
name: Documentation
on:
push:
branches:
- master
jobs:
docs:
permissions:
contents: write
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Build documentation
run: RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps
# uses: actions-rs/cargo@v1
# with:
# command: doc
# args: --verbose --no-deps --all-features
- name: Finalize documentation
run: |
CRATE_NAME=$(echo '${{ github.repository }}-lib' | tr '[:upper:]' '[:lower:]' | cut -f2 -d"/")
echo "<meta http-equiv=\"refresh\" content=\"0; url=${CRATE_NAME/-/_}\">" > target/doc/index.html
touch target/doc/.nojekyll
- name: Upload as artifact
uses: actions/upload-artifact@v2
with:
name: Documentation
path: target/doc
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
# ACCESS_TOKEN: ${{ secrets.GH_PAT }}
# BRANCH: gh-pages
folder: target/doc