Skip to content

Build Publications (static) #26

Build Publications (static)

Build Publications (static) #26

name: Build Publications (static)
on:
push:
paths:
- "publications.bib"
- "tools/build_publications.py"
- "tools/publications_template.html"
- ".github/workflows/build-publications.yml"
workflow_dispatch: {}
schedule:
- cron: "0 6 * * 1" # ogni lunedì alle 06:00 UTC
permissions:
contents: write # necessario per committare output
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install bibtexparser
- name: Generate publications page
env:
BIB_PATH: publications.bib
OUT_PATH: publications.html
PAGE_TITLE: "Publications"
HIGHLIGHT_AUTHOR: "Laura Pollacci"
TEMPLATE_PATH: tools/publications_template.html
run: python tools/build_publications.py
- name: Commit & push if changed
run: |
if ! git diff --quiet -- publications.html; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add publications.html
git commit -m "chore: update publications [skip ci]"
git push
else
echo "No changes to commit."
fi