1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-23 14:06:16 +02:00

Run exerciser as mdbook renderer.

This commit is contained in:
Andrew Walbran 2023-04-03 16:18:32 +01:00
parent e204b5060f
commit b6f5ba1af0
4 changed files with 13 additions and 1 deletions

View File

@ -18,3 +18,7 @@ runs:
- name: Install mdbook-i18n-helpers
run: cargo install mdbook-i18n-helpers --locked --version 0.1.0
shell: bash
- name: Install exerciser
run: cargo install --path mdbook-exerciser --locked
shell: bash

View File

@ -50,13 +50,16 @@ jobs:
echo "::endgroup::"
done
- name: Zip exercise templates
run: cd book/exerciser && zip --recurse-paths ../html/exercises.zip exercise-templates/
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: book
path: book/html
- name: Deploy to GitHub Pages
id: deployment

View File

@ -30,6 +30,7 @@ The course is built using a few tools:
- [mdbook](https://github.com/rust-lang/mdBook)
- [mdbook-svgbob](https://github.com/boozook/mdbook-svgbob)
- [mdbook-i18n-helpers](TRANSLATIONS.md#i18n-helpers)
- [exerciser](exerciser/)
Install these tools with:
@ -37,6 +38,7 @@ Install these tools with:
$ cargo install mdbook
$ cargo install mdbook-svgbob
$ cargo install mdbook-i18n-helpers
$ cargo install --path mdbook-exerciser
```
Then run

View File

@ -48,3 +48,6 @@ editable = true
"generics/closures.html" = "traits/closures.html"
"generics/impl-trait.html" = "traits/impl-trait.html"
"generics/trait-bounds.html" = "traits/trait-bounds.html"
[output.exerciser]
output-directory = "exercise-templates"