-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.07 KB
/
generate-md.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
name: Generate Markdown
on: push
jobs:
generate-md:
name: Generate Markdown from bib
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./src/requirements.txt
- name: Convert bib to markdown
run: |
tmp_file=$(mktemp --suffix=.bib)
cat $(find . -name \*.bib) > $tmp_file
python ./src/convert_bib.py \
-i $tmp_file \
-o publications.md
rm $tmp_file
- name: Push Markdown file to the repository
run: |
if [[ `git status --porcelain publications.md` ]]; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add publications.md
git commit -m "Create Markdown automatically"
git push
fi