Skip to content

add license to subdirs #19

add license to subdirs

add license to subdirs #19

Workflow file for this run

name: 📖
on:
push:
pull_request:
branches: [main]
merge_group:
jobs:
build-docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Install LAPACK, OpenBLAS, SCOTCH
run: sudo apt-get install -y libopenblas-dev liblapack-dev libscotch-dev
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.14"
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "nightly"
- name: Set up MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: "mpich"
- uses: actions/checkout@v4
- name: Build Rust docs
run: RUSTDOCFLAGS="--html-in-header katex-header.html" cargo +nightly doc --no-deps -Zunstable-options -Zrustdoc-scrape-examples --all-features
- name: Set file permissions
run: |
rm target/doc/.lock
chmod -c -R +rX target/doc
- name: Install uv
run: pip install uv
- name: Make virtual environment
run: |
uv venv .venv
uv pip install pip
- name: Build Python docs
run: |
source .venv/bin/activate
cd ndelement/python/docs
uv pip install -r requirements.txt
make html
- name: Move docs
run: |
mkdir doc
mkdir doc/python
mv target/doc doc/rust
mv ndelement/python/docs/_build/html doc/python/ndelement
- name: Make index page
run: |
echo "<html><head><title>nd docs</title></head><body>" > doc/index.html
echo "<h1>ndelement</h1><center><a href='rust/ndelement'>Rust docs</a><br /><a href='python/ndelement'>Python docs</a></center>" >> doc/index.html
echo "<h1>ndgrid</h1><center><a href='rust/ndgrid'>Rust docs</a></center>" >> doc/index.html
echo "</body></html>" >> doc/index.html
- name: Setup Pages
uses: actions/configure-pages@v3
if: github.ref == 'refs/heads/main'
- name: Upload artifact for docs
uses: actions/upload-pages-artifact@v3
with:
path: 'doc'
if: github.ref == 'refs/heads/main'
deploy-docs:
name: Deploy docs to GitHub pages
runs-on: ubuntu-latest
needs:
- build-docs
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy docs to GitHub Pages
uses: actions/deploy-pages@v4