forked from QuEraComputing/ppvm
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.26 KB
/
Copy pathrust-docs.yml
File metadata and controls
58 lines (47 loc) · 1.26 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
55
56
57
58
name: Rust Docs
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C target-feature=+aes,+sse2"
jobs:
build:
name: Build Rust docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.98.0
- uses: Swatinem/rust-cache@v2
- name: Build docs
run: cargo doc --workspace --no-deps
- name: Add redirect index
run: echo '<meta http-equiv="refresh" content="0; url=ppvm_traits">' > target/doc/index.html
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rust-docs
path: target/doc/
deploy:
name: Deploy Rust docs
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: deploy-gh-pages
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: rust-docs
path: target/doc/
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
destination_dir: rust-api
keep_files: true