askama/.readthedocs.yaml
René Kijewski 9bf41656a4 ci: some fixes
* forgot to update source folder in [#473]
* documentation creation was not checked for `askama_escape`
* cluster-fuzz could not [upload sarif file] that contained its outcome
* let all fuzzers run for the same amount of time

[#473]: <https://redirect.github.com/askama-rs/askama/pull/473>
[upload sarif file]: <https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github>
2025-06-03 14:48:37 +02:00

39 lines
2.0 KiB
YAML

# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-lts-latest
tools:
python: "3.12"
commands:
# Install a current version of rust
- asdf install rust 1.86.0
- asdf global rust 1.86.0
# proc-macro2 v1.0.95 expects at least nightly-2025-04-16.
- cargo update --package proc-macro2 --precise 1.0.94
# Generate "book/theme/index.hbs" as "skeleton" of the generated pages.
- book/update-theme.py
# Install mdbook.
- mkdir -p $HOME/bin
- curl --location --silent --show-error --fail https://github.com/cargo-bins/cargo-quickinstall/releases/download/mdbook-0.4.40/mdbook-0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xzvvf - -C $HOME/bin
# Convert the book to HTML.
- $HOME/bin/mdbook build book --dest-dir $READTHEDOCS_OUTPUT/html
# Make the ads readable.
- cat book/ethicalads-theme.css >> $READTHEDOCS_OUTPUT/html/css/general.css
# We are done!
- cp book/404.html $READTHEDOCS_OUTPUT/html
# Build and copy the API docs
- cargo install cargo-docs-rs
- mkdir --parents rustdocs/x86_64-unknown-linux-gnu/doc/
- ln --relative --symbolic --no-target-directory rustdocs/x86_64-unknown-linux-gnu/doc rustdocs/doc
- CARGO_BUILD_TARGET_DIR=rustdocs RUSTC_BOOTSTRAP=1 cargo docs-rs --target x86_64-unknown-linux-gnu --package askama
- CARGO_BUILD_TARGET_DIR=rustdocs RUSTC_BOOTSTRAP=1 cargo docs-rs --target x86_64-unknown-linux-gnu --package askama_derive
- CARGO_BUILD_TARGET_DIR=rustdocs RUSTC_BOOTSTRAP=1 cargo docs-rs --target x86_64-unknown-linux-gnu --package askama_escape
- CARGO_BUILD_TARGET_DIR=rustdocs RUSTC_BOOTSTRAP=1 cargo docs-rs --target x86_64-unknown-linux-gnu --package askama_macros
- CARGO_BUILD_TARGET_DIR=rustdocs RUSTC_BOOTSTRAP=1 cargo docs-rs --target x86_64-unknown-linux-gnu --package askama_parser
- cp --preserve=all --recursive --target-directory $READTHEDOCS_OUTPUT/html/ rustdocs/x86_64-unknown-linux-gnu/doc/