Skip to content

Update CSL file

Update CSL file #3

Workflow file for this run

name: Update CSL file
on:
schedule:
- cron: '0 0 * * 1' # Runs weekly on Monday at 00:00 UTC
workflow_dispatch: # Allows manual triggering
jobs:
update-csl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download latest CSL file
run: |
curl -o inst/apa-old-doi-prefix.csl https://raw.githubusercontent.com/citation-style-language/styles/master/apa-old-doi-prefix.csl
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "No changes to commit"
exit 0
fi
- name: Commit and push if changed
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add inst/apa-old-doi-prefix.csl
git commit -m "Update CSL file from upstream"
git push