Merge pull request #11 from SolarLiner/feat/ADAA #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
push: | |
branches: [main] | |
jobs: | |
doc: | |
name: Documentation | |
runs-on: ubuntu-22.04 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }}/valib | |
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 --all-features --no-deps | |
- 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-pages-artifact@v3 | |
with: | |
path: target/doc | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |