Trying out new docs structure #6
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: 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: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './target/doc' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |