-
Notifications
You must be signed in to change notification settings - Fork 6
31 lines (27 loc) · 939 Bytes
/
update-csl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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