Skip to content

Bump upload-pages-artifact to v5, fix concurrency #15

Bump upload-pages-artifact to v5, fix concurrency

Bump upload-pages-artifact to v5, fix concurrency #15

Workflow file for this run

name: Build and Deploy PDFs
on:
push:
branches: [main]
paths:
- "sources/**"
- "templates/**"
- "scripts/**"
- "site/**"
- "Makefile"
- ".github/workflows/build-pdfs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Cache Pandoc
id: cache-pandoc
uses: actions/cache@v5
with:
path: /tmp/pandoc.deb
key: pandoc-3.9.0.2
- name: Install Pandoc
run: |
if [ ! -f /tmp/pandoc.deb ]; then
curl -sLo /tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-1-amd64.deb
fi
sudo dpkg -i /tmp/pandoc.deb
- name: Cache Typst
id: cache-typst
uses: actions/cache@v5
with:
path: /usr/local/bin/typst
key: typst-0.14.2
- name: Install Typst
if: steps.cache-typst.outputs.cache-hit != 'true'
run: |
curl -sL https://github.com/typst/typst/releases/download/v0.14.2/typst-x86_64-unknown-linux-musl.tar.xz \
| tar -xJ --strip-components=1 -C /usr/local/bin typst-x86_64-unknown-linux-musl/typst
- name: Build PDFs
run: make -j4 all
- name: Assemble site
run: |
mkdir -p _site
cp output/*.pdf _site/
BUILD_DATE=$(date -u '+%b %d, %Y')
sed "s/__BUILD_DATE__/$BUILD_DATE/" site/index.html > _site/index.html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: _site/
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5