trying cached build with cargo

This commit is contained in:
sneakers-the-rat 2023-06-05 17:50:21 -07:00
parent 5ff646cdcf
commit 12e23ac86e
4 changed files with 2600 additions and 11 deletions

View file

@ -21,17 +21,23 @@ jobs:
rustup set profile minimal
rustup toolchain install nightly -c rust-docs
rustup override set nightly
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install plugins
run: |
cargo install mdbook-bib
cargo install mdbook-mermaid
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-targets: "false"
- run: cargo install --locked
# - name: Install latest mdbook
# run: |
# tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
# url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
# mkdir mdbook
# curl -sSL $url | tar -xz --directory=./mdbook
# echo `pwd`/mdbook >> $GITHUB_PATH
# - name: Install plugins
# run: |
# cargo install mdbook-bib
# cargo install mdbook-mermaid
- name: Deploy GitHub Pages
run: |
# This assumes your book is in the root of your repository.

5
.gitignore vendored
View file

@ -1 +1,6 @@
book
# Added by cargo
/target

2560
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

18
Cargo.toml Normal file
View file

@ -0,0 +1,18 @@
[package]
name = "docs"
version = "0.1.0"
edition = "2021"
authors = ["Jonny Saunders <j@nny.fyi>"]
documentation = "https://piracy.solutions/docs"
readme="README.md"
homepage = "https://piracy.solutions/docs"
repository = "https://github.com/p2p-ld/docs"
exclude = ["/book"]
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
mdbook = "0.4.30"
mdbook-bib = "0.0.5"
mdbook-mermaid = "0.12.6"