Refactored and structurized #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run zotero-to-html.py | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'bibliography.html' | |
- 'README.md' | |
schedule: | |
- cron: '0 3 * * *' # Daily at 03:00 | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v4 # checkout the repository content | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.13' # use latest python version | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: execute py script | |
run: python zotero-to-html.py | |
- name: commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Babalion" | |
git add -A | |
git diff --exit-code || git commit -a -m "updated with action" --allow-empty | |
- name: push changes | |
run: | | |
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master |