Skip to content

Feature/prepyrus v2 #13

Feature/prepyrus v2

Feature/prepyrus v2 #13

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/