-
Notifications
You must be signed in to change notification settings - Fork 97
74 lines (68 loc) · 2.27 KB
/
Copy pathdocs.yaml
File metadata and controls
74 lines (68 loc) · 2.27 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "Docs"
on:
push:
branches: [ "master" ]
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
CARGO_NET_RETRY: "10"
jobs:
coverage:
name: Coverage
uses: ./.github/workflows/reusable-coverage.yml
secrets: inherit
with:
toolchain: stable
linux_cargo_paths: true
linux_disk_workarounds: false
linux_runner_label: ubuntu-latest-m
build:
needs: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check out local Copper dependencies
run: support/ci/checkout_local_dependencies.sh
- name: Set up Rust
uses: dtolnay/rust-toolchain@nightly
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- name: Build API docs
run: cargo +nightly doc --no-deps
env:
RUSTDOCFLAGS: --enable-index-page -Zunstable-options
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.x"
- name: Install MkDocs
run: python -m pip install --upgrade pip mkdocs mkdocs-material
- name: Prepare wiki sources
run: python support/ci/wiki_site.py
- name: Build wiki site
run: mkdocs build -f build/wiki/mkdocs.yml
- name: Stage API docs
run: |
mkdir -p build/wiki/site/api
cp -R target/doc/* build/wiki/site/api/
- name: Download coverage artifact
uses: actions/download-artifact@v8
with:
name: coverage-report
path: build/coverage-report
- name: Stage coverage report
run: |
mkdir -p build/wiki/site/coverage
cp -R build/coverage-report/html/. build/wiki/site/coverage/
- name: Deploy wiki to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/wiki/site
- name: Summarize published site
run: |
{
echo "Published docs: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/"
echo "Published coverage: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/coverage/"
} >> "$GITHUB_STEP_SUMMARY"