Feature/prepyrus v2 #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify MDX content | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
jobs: | |
verification: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache/restore@v4 | |
id: prepyrus-cache-restore | |
with: | |
path: target/release | |
key: ${{ runner.os }}-cargo-${{ hashFiles('scripts/prepyrus/Cargo.lock') }}-${{ hashFiles('scripts/prepyrus/src/**') }} | |
- name: Install Rust | |
if: steps.prepyrus-cache-restore.outputs.cache-hit != 'true' | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install dependencies | |
if: steps.prepyrus-cache-restore.outputs.cache-hit != 'true' | |
run: cargo build --release --package prepyrus | |
- name: Run prepyrus script in verification mode | |
run: target/release/prepyrus absolute_bibliography.bib src/pages verify | |
- name: Save Prepyrus to cache | |
id: prepyrus-cache-save | |
if: steps.prepyrus-cache-restore.outputs.cache-hit != 'true' | |
uses: actions/cache/save@v4 | |
with: | |
path: target/release | |
key: ${{ runner.os }}-cargo-${{ hashFiles('scripts/prepyrus/Cargo.lock') }}-${{ hashFiles('scripts/prepyrus/src/**') }} | |
# | |
# To include multiple paths for the cache: | |
# path: | | |
# ~/.cargo/bin/ | |
# ~/.cargo/registry/index/ | |
# ~/.cargo/registry/cache/ | |
# ~/.cargo/git/db/ | |
# target/ |