Skip to content

Use clippy pedantic #11

Use clippy pedantic

Use clippy pedantic #11

Workflow file for this run

---
name: Documentation
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
# uncomment if using workspaces wth `enable-index-page`
# uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, rust-src, clippy
- name: Build Documentation
env:
# Uncomment if using `enable-index-page`
# RUSTUP_TOOLCHAIN: nightly
# RUSTDOCFLAGS: -D warnings -Zunstable-options --enable-index-page
RUSTDOCFLAGS: -D warnings
run: |
cargo doc \
--no-deps \
--document-private-items \
--all-features
# --workspace
# Workaround to redirect to subdir/index.html for **non-workspace** projects
# https://dev.to/deciduously/prepare-your-rust-api-docs-for-github-pages-2n5i
echo '<meta http-equiv="refresh" content="0; url={{ project-name }}">' > target/doc/index.html
- name: Upload artifact to Pages
uses: actions/upload-pages-artifact@v1
with:
path: 'target/doc'
deploy:
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: {% raw %}${{ steps.deployment.outputs.page_url }}{% endraw %}

Check failure on line 51 in .github/workflows/docs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docs.yml

Invalid workflow file

You have an error in your yaml syntax on line 51
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1