Fixing broken link in documentation #24
Workflow file for this run
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 Github Pages | |
on: | |
push: | |
tags: [ "docs" ] | |
permissions: | |
pages: write | |
id-token: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: 'latest' | |
- run: mdbook build . | |
- name: Install X11 dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libx11-dev libxft-dev libxinerama-dev libxrandr-dev pkg-config | |
version: 1.0 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build docs with cargo | |
uses: ClementTsang/cargo-action@v0.0.3 | |
with: | |
command: doc | |
args: --no-deps | |
# - name: Create forwarding to actual index.html | |
# run: echo '<meta http-equiv="refresh" content="0; url=marswm">' > ./target/doc/index.html | |
- name: Fix file permissions | |
shell: sh | |
run: | | |
chmod -c -R +rX "target/doc" | | |
while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Copy stuff around | |
shell: sh | |
run: | | |
cp -r target/book output | |
cp -r target/doc output/crate | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './output' | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |