Skip to content

Nits

Nits #60

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: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: "stable"
components: rustfmt
- name: Set up MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: "mpich"
- uses: actions/checkout@v3
- name: Build docs
run: cargo doc --no-deps --features "mpi,strict"
build-and-deploy-docs:
name: Build and deploy docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.ref == 'refs/heads/main'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: "stable"
components: rustfmt
- name: Set up MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: "mpich"
- uses: actions/checkout@v3
- name: Build docs
run: cargo doc --no-deps --features "mpi"
- name: make index.html
run: |
echo "<html><body>"
echo "<h1>Bempp-rs documentation</h1>"
echo "<ul>" >> target/doc/index.html
for f in target/doc/bempp_*
do
if [ -d "$f" ]
then
echo "<li><a href='${f##*/}'>${f##*/}</a></li>" >> target/doc/index.html
fi
done
echo "</ul></body></html>" >> target/doc/index.html
- name: Set file permissions
run: |
rm target/doc/.lock
chmod -c -R +rX target/doc
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact for docs
uses: actions/upload-pages-artifact@v1
with:
path: 'target/doc'
- name: Deploy docs to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2