Skip to content

Merge pull request #393 from tensor4all/feat/capi-expansion #163

Merge pull request #393 from tensor4all/feat/capi-expansion

Merge pull request #393 from tensor4all/feat/capi-expansion #163

Workflow file for this run

name: Deploy Documentation
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
# Only run on the main repository, not on forks
if: github.repository == 'tensor4all/tensor4all-rs'
steps:
- uses: actions/checkout@v4
- name: Install HDF5
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install mdBook
run: cargo install mdbook --version 0.5.2 --locked
- name: Build mdBook
run: mdbook build docs/book
- name: Build rustdoc
run: cargo xtask doc
- name: Combine documentation
run: |
mkdir -p _site
cp -r docs/book/book/* _site/
mkdir -p _site/rustdoc
cp -r target/doc/* _site/rustdoc/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.repository == 'tensor4all/tensor4all-rs'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4