-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.4 KB
/
docs.yml
File metadata and controls
55 lines (46 loc) · 1.4 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
name: Publish RustDocs (trace2e_core)
on:
push:
branches:
- master
paths:
- 'crates/trace2e_core/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/docs.yml'
workflow_dispatch:
# Needed to push to gh-pages
permissions:
contents: write
env:
PROTOC_VERSION: 3.21.12
CARGO_TERM_COLOR: always
concurrency:
group: docs-pages
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup
uses: ./.github/actions/rust-setup
with:
cache: true
protoc: true
- name: Build docs for trace2e_core
run: |
cargo doc --no-deps -p trace2e_core
- name: Add helpful index redirect
run: |
echo '<!DOCTYPE html><meta charset="utf-8"><meta http-equiv="refresh" content="0; url=trace2e_core/index.html"><link rel="canonical" href="trace2e_core/index.html">' > target/doc/index.html
- name: Deploy to GitHub Pages (gh-pages branch)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com
commit_message: "docs: update trace2e_core rustdocs for ${{ github.sha }}"