1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-18 02:42:05 +03:00

ci: maybe improve caching for pages workflow

This commit is contained in:
Wez Furlong 2022-05-06 20:04:11 -07:00
parent c44fd1a006
commit c16ea9b134

View File

@ -25,21 +25,26 @@ jobs:
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
source $HOME/.cargo/env source $HOME/.cargo/env
rustup update stable rustup update stable
- name: Cache mdBook - uses: actions/cache@v3
uses: actions/cache@v1
with: with:
path: ~/mdbook-bin path: |
key: cargo-bin-mdbook-2 ~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-mdbook
- name: Install mdBook - name: Install mdBook
run: | run: |
mkdir -p ~/mdbook-bin (test -x ~/.cargo/bin/mdbook || (cd && cargo install --vers "^0.4" mdbook))
(test -x ~/mdbook-bin/mdbook || (cd && cargo install --vers "^0.4" mdbook && cp -p ~/.cargo/bin/mdbook ~/mdbook-bin)) - name: Install mdBook linkcheck
(test -x ~/mdbook-bin/mdbook-linkcheck || (cd && cargo install mdbook-linkcheck && cp -p ~/.cargo/bin/mdbook-linkcheck ~/mdbook-bin)) run: |
(test -x ~/mdbook-bin/mdbook-mermaid || (cd && cargo install mdbook-mermaid && cp -p ~/.cargo/bin/mdbook-mermaid ~/mdbook-bin)) (test -x ~/.cargo/bin/mdbook-linkcheck || (cd && cargo install mdbook-linkcheck))
- name: Install mdBook mermaid
run: |
(test -x ~/.cargo/bin/mdbook-mermaid || (cd && cargo install mdbook-mermaid))
- name: Build - name: Build
run: | run: |
source $HOME/.cargo/env source $HOME/.cargo/env
PATH="$HOME/mdbook-bin:$PATH"
./ci/build-docs.sh ./ci/build-docs.sh
- name: Deploy - name: Deploy
if: success() if: success()