-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.49 KB
/
documentation.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
name: Documentation
on:
push:
branches: [main]
jobs:
doc:
name: Documentation
runs-on: ubuntu-22.04
permissions:
id-token: write
pages: write
steps:
- name: Install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libgl-dev libjack-dev libx11-xcb-dev libxcb1-dev libxcb-dri2-0-dev libxcb-icccm4-dev libxcursor-dev libxkbcommon-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.name }}-${{ matrix.cross-target }}
- uses: actions/checkout@v2
- name: Fetch all git history
run: git fetch --force --prune --tags --unshallow
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
- name: Build documentation
run: cargo doc
- name: Fix permissions
run: |
chmod -c -R +rX "target/doc" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-artifact@v4
with:
path: target/doc/valib
name: github-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action