Skip to content

Merge branch 'main' of https://github.com/germolinal/simple_docs #34

Merge branch 'main' of https://github.com/germolinal/simple_docs

Merge branch 'main' of https://github.com/germolinal/simple_docs #34

Workflow file for this run

name: Build Docs
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
# This is the one we use for producing documentation
build_docs:
runs-on: ubuntu-latest
permissions:
contents: "read"
pages: write
id-token: "write"
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install MdBook
run: cargo install mdbook
- name: Install MDBook Katex
run: cargo install mdbook-katex
- name: Compile Book
run: |
mkdir tmp
cp -R auto_src/. tmp/.
cat src/SUMMARY_TEMPLATE.md > tmp_summary.md
cat tmp/docs/ioreference/src/SUMMARY.md >> tmp_summary.md
cp -R src/. tmp/docs/ioreference/src/.
cat tmp_summary.md > tmp/docs/ioreference/src/SUMMARY.md
- name: Build mdbook
run: |
cd tmp/docs/ioreference
mdbook build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload Docs
path: "tmp/docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4