-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) · 1.54 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build & Publish Documentation
on:
push:
branches: [ "develop", "main" ]
tags: [ "v*" ]
permissions:
contents: read
packages: none
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libxapian-dev
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
toolchain: stable
components: clippy
- uses: actions/cache@v3
with:
key: cargo-${{ hashFiles('**/Cargo.lock') }}-ci
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build Docs
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: doc
args: --no-deps
- name: Generate Index Redirect
run: echo '<meta http-equiv="refresh" content="0;url=xapian_rs/index.html">' >target/doc/index.html
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'target/doc'
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4