forked from susheel/papers
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (48 loc) · 1.67 KB
/
extract-preprints.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
47
48
49
50
name: extract-preprints
on:
schedule:
# Run at 01:30 every day
- cron: '30 1 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
extract-papers:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Extract COVID-19 Preprints
env:
PASSPHRASE: ${{ secrets.PASSPHRASE }}
run: |
mkdir $HOME/secrets
gpg --quiet --batch --yes --decrypt --passphrase="$PASSPHRASE" --output $HOME/secrets/contacts.csv data/contacts.csv.gpg
python3 preprint-extractor.py
- name: Commit extracts to master branch
uses: stefanzweifel/git-auto-commit-action@v4.1.6
with:
commit_message: Commit new papers and preprints
branch: ${{ github.head_ref }}
commit_user_name: Susheel Varma
commit_user_email: susheel.varma@hdruk.ac.uk
commit_author: Susheel Varma <susheel.varma@hdruk.ac.uk>
- name: Commit extracts to gh-pages branch
uses: stefanzweifel/git-auto-commit-action@v4.1.6
with:
commit_message: Commit new papers and preprints
branch: gh-pages
commit_user_name: Susheel Varma
commit_user_email: susheel.varma@hdruk.ac.uk
commit_author: Susheel Varma <susheel.varma@hdruk.ac.uk>