Skip to content

Adding mdBook documentation #9

Adding mdBook documentation

Adding mdBook documentation #9

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: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './target/book'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
# rust-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