Skip to content
Snippets Groups Projects
Verified Commit ac74aadd authored by Marco Aceti's avatar Marco Aceti
Browse files

Add caching support in mdbook-deploy workflow

parent dab8cc15
No related branches found
No related tags found
No related merge requests found
...@@ -32,20 +32,49 @@ jobs: ...@@ -32,20 +32,49 @@ jobs:
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y wget default-jre default-jdk graphviz libssl-dev pkg-config sudo apt-get install -y wget default-jre default-jdk graphviz libssl-dev pkg-config
- name: Restore from cache
uses: actions/cache/restore@v3
id: cache-restore
with:
path: |
plantuml.jar
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}
- name: Install mdBook - name: Install mdBook
if: steps.cache-restore.outputs.cache-hit != 'true'
run: | run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update rustup update
cargo install mdbook cargo install mdbook
cargo install mdbook-plantuml cargo install mdbook-plantuml
- name: Install PlantUML - name: Download PlantUML
if: steps.cache-restore.outputs.cache-hit != 'true'
run: | run: |
wget https://github.com/plantuml/plantuml/releases/download/v1.2022.13/plantuml-1.2022.13.jar -O plantuml.jar wget https://github.com/plantuml/plantuml/releases/download/v1.2022.13/plantuml-1.2022.13.jar -O plantuml.jar
echo "#!/bin/bash" > plantuml ; echo "java -jar $PWD/plantuml.jar \"\$1\" \"\$2\"" >> plantuml
- name: Install PlantUML
run: |
echo "#!/bin/bash" > plantuml ; echo "java -jar $PWD/plantuml.jar \"\$@\"" >> plantuml
sudo mv plantuml /usr/bin/plantuml sudo mv plantuml /usr/bin/plantuml
sudo chmod +x /usr/bin/plantuml sudo chmod +x /usr/bin/plantuml
- name: Save PlantUML to cache
id: cache-save
uses: actions/cache/save@v3
with:
path: |
plantuml.jar
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v3 uses: actions/configure-pages@v3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment