Skip to content

GitHub action to retrieve Zotero collection in BibLaTeX format and save it as GitHub repository #1119

GitHub action to retrieve Zotero collection in BibLaTeX format and save it as GitHub repository

GitHub action to retrieve Zotero collection in BibLaTeX format and save it as GitHub repository #1119

name: GitHub action to retrieve Zotero collection in BibLaTeX format and save it as GitHub repository
on:
schedule:
- cron: '0 8,12,18 * * *'
push:
branches:
- test
workflow_dispatch:
jobs:
zotero-bib-to-gh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run
run: python zotero-bib-to-gh.py
env:
ZOTERO_USER_ID: ${{ secrets.ZOTERO_USER_ID }}
ZOTERO_BEARER_TOKEN: ${{ secrets.ZOTERO_BEARER_TOKEN }}
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
echo `git add -A && git commit -m "Add changes"`
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}