-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.18 KB
/
python.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Run Python Scripts
on:
workflow_dispatch:
workflow_run:
workflows: [Update files]
types: [completed]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
Python:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: update-out
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install python dependencies
run: pip install -r requirements.txt
- name: Run bibliography_convert.py
run: python bibliography_convert.py
- name: Clean BibTeX and BibLaTeX files
run: |
python clean_bibtex.py
python clean_biblatex.py
- name: Commit the changes to update_out
run: |
date > out/auto_gen_date_bib.txt
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git status
git commit -m "auto-update html table and clean bib files"
git push