-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (75 loc) · 2.53 KB
/
github-doc-deploy.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Docs
on: workflow_dispatch
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
jobs:
build_and_deploy_doc:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
name: "Build documentation and deploy to Pages"
env:
llvm_version: 16
doc_output_path: target/doc/
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install PipeWire
run: sudo apt-get install -y pipewire libpipewire-0.3-dev libspa-0.2-dev pipewire-media-session- wireplumber
- name: Run PipeWire
run: systemctl --user --now enable wireplumber.service
- name: LLVM Cache Restore
id: llvm-cache-restore
uses: actions/cache/restore@v3
with:
path: ${{ runner.temp }}/llvm-${{ env.llvm_version }}
key: llvm-${{ env.llvm_version }}-${{ runner.os }}
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ env.llvm_version }}
directory: ${{ runner.temp }}/llvm-${{ env.llvm_version }}
cached: ${{ steps.llvm-cache-restore.outputs.cache-hit }}
- name: Save Cache
id: llvm-cache-save
uses: actions/cache/save@v3
if: ${{ !steps.llvm-cache-restore.outputs.cache-hit }}
with:
path: ${{ runner.temp }}/llvm-${{ env.llvm_version }}
key: llvm-${{ env.llvm_version }}-${{ runner.os }}
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Cargo Doc
uses: actions-rs/cargo@v1
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ env.llvm_version }}/lib
RUSTDOCFLAGS: --enable-index-page -Zunstable-options
with:
args: --package pipewire-wrapper*
toolchain: nightly
command: doc
- name: Fix permissions
run: |
chmod -c -R +rX "${{ env.doc_output_path }}" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ${{ env.doc_output_path }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2