diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..30ce177 --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,43 @@ +name: Update 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: + update-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 -e "\nREADME.md is out of date. Run update-readme.sh and re-commit the result." + exit 1 + fi diff --git a/markdown/README.md b/markdown/README.md index 8d565f3..3a8e4f4 100644 --- a/markdown/README.md +++ b/markdown/README.md @@ -8,6 +8,8 @@ In this repository you can an archive of the use of 'Mantis' across research pub Each branch is dedicated to one of these publications, and the current branch, `main`, provides a list of links for all branches. +Fail + If you whish to look at all publications, you can run `git clone https://github.com/MantisFEM/Research.git`, or to check out a single publication, under branch `name/of/publication` you can run `git clone --single-branch