Skip to content

Fix new clippy warnings #94

Fix new clippy warnings

Fix new clippy warnings #94

Workflow file for this run

name: Documentation
on:
push:
branches: [master]
tags: ["*"]
pull_request:
# Check all PR
jobs:
build-and-publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: setup rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: build documentation
run: |
cd example
cargo doc --no-deps
- name: put documentation in the website
run: |
git clone https://github.com/$GITHUB_REPOSITORY --branch gh-pages gh-pages
rm -rf gh-pages/.git
cd gh-pages
REF_KIND=$(echo $GITHUB_REF | cut -d / -f2)
if [[ "$REF_KIND" == "tags" ]]; then
TAG=${GITHUB_REF#refs/tags/}
mv ../target/doc/ $TAG
cp ../example/index.html $TAG/index.html
else
rm -rf latest
mv ../target/doc/ latest
cp ../example/index.html latest/index.html
fi
- name: deploy to gh-pages
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages/
force_orphan: true