-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (48 loc) · 1.45 KB
/
docs.yml
File metadata and controls
54 lines (48 loc) · 1.45 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
52
53
54
name: Build and deploy docs
on:
pull_request:
push:
branches:
- master
jobs:
rustdocs:
name: Build rustdocs
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.13.1
with:
access_token: ${{ github.token }}
- name: Checkout sources
uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: recursive
- name: Install Stable Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --no-deps --all
- name: Move built docs
run: |
mv ./target/doc/ ./docs/
echo "<meta http-equiv=\"refresh\" content=\"0; url=multilinear_extensions\">" > docs/index.html
ls -l ./docs/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
# published only from master AND if the triggerer is not dependabot
# https://github.com/dependabot/dependabot-core/issues/3253#issuecomment-797125425
#
if: ${{ github.ref == 'refs/heads/master' && github.actor != 'dependabot[bot]' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/