From 59ba0906f6fc89eeaf9dbc0b174e5aeaaefd9c54 Mon Sep 17 00:00:00 2001 From: "Diogo C. Cabanas" Date: Tue, 3 Mar 2026 09:36:22 +0100 Subject: [PATCH 1/3] chore: add helper script --- update_readme.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 update_readme.sh diff --git a/update_readme.sh b/update_readme.sh new file mode 100755 index 0000000..20bb24c --- /dev/null +++ b/update_readme.sh @@ -0,0 +1,20 @@ +#! /usr/bin/env bash + +# This script will update 'README.md' from 'markdown/README.md'. + +# Check if 'pandoc' is installed and in 'PATH'. +if ! command -v pandoc >/dev/null 2>&1; then + echo "'pandoc' not found in 'PATH'. Please install or add to 'PATH'." + exit 1 +fi + +# Update README +pandoc markdown/README.md \ + --from markdown+citations \ + --to gfm \ + --citeproc \ + --wrap=none \ + --csl=markdown/apa.csl \ + --bibliography=markdown/references.bib \ + --metadata=reference-section-title:References \ + -o README.md From db02f5186ea0eb4e6d09c83b8c6f144ea0a5383a Mon Sep 17 00:00:00 2001 From: "Diogo C. Cabanas" Date: Tue, 3 Mar 2026 09:43:39 +0100 Subject: [PATCH 2/3] chore: add workflow check for README updates --- .github/workflows/update-readme.yml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..4d793ce --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,44 @@ +name: Generate README.md + +on: + pull_request: + paths: + - "markdown/README.md" + - "markdown/references.bib" + - "markdown/apa.csl" + - "update-readme.sh" + - ".github/workflows/update-readme.yml" + push: + branches: ["main"] + paths: + - "markdown/README.md" + - "markdown/references.bib" + - "markdown/apa.csl" + - "update-readme.sh" + - ".github/workflows/update-readme.yml" + +permissions: + contents: read + +jobs: + generate-readme: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Pandoc + uses: pandoc/actions/setup@v1 + with: + version: "3.1.13" + + - name: Run README update script + run: bash update-readme.sh + + - name: Check if README.md is up to date + run: | + if ! git diff --exit-code -- README.md; then + echo "README.md is out of date. Run update-readme.sh and re-commit the result." + git --no-pager diff -- README.md + exit 1 + fi From 31e43eed1c8cf656d564698c90cdd89a13faa875 Mon Sep 17 00:00:00 2001 From: "Diogo C. Cabanas" Date: Tue, 3 Mar 2026 09:47:59 +0100 Subject: [PATCH 3/3] chore: test workflow --- markdown/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/markdown/README.md b/markdown/README.md index 8d565f3..c6d5923 100644 --- a/markdown/README.md +++ b/markdown/README.md @@ -13,6 +13,8 @@ https://github.com/MantisFEM/Research.git`, or to check out a single publication branch `name/of/publication` you can run `git clone --single-branch --branch=name/of/publication https://github.com/MantisFEM/Research.git`. +Testing workflow. + # Publications ## Papers