Remove Marp Theme, Adapt Fonts #16
This file contains hidden or 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: Compile Typst Slides and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'Curriculum/**/slides/**' | |
| - '.github/workflows/compile-typst.yml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| compile-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - uses: fontist/setup-fontist@v2 | |
| - run: fontist install "Noto Sans Math" | |
| - run: fontist install "Noto Sans Mono" | |
| - uses: typst-community/setup-typst@v3 | |
| with: | |
| typst-version: 0.12.0 | |
| - run: | | |
| mkdir -p compiled-slides | |
| find Curriculum -type f -path "*/slides/*.typ" | while read file; do | |
| echo "Compiling $file" | |
| filename=$(basename "$file" .typ) | |
| typst compile "$file" "compiled-slides/${filename}.pdf" --root . || echo "❌ Failed: $file" | |
| done | |
| - name: Fail if no slides were compiled | |
| run: | | |
| if ! ls compiled-slides/*.pdf 2>/dev/null; then | |
| echo "❌ No slides were compiled!" | |
| exit 1 | |
| fi | |
| - name: Create GitHub Release and upload PDFs | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest-slides | |
| name: "Latest Compiled Slides" | |
| body: "Compiled PDFs of all slides in the Curriculum directory." | |
| files: compiled-slides/*.pdf | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |