-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (32 loc) · 936 Bytes
/
scrape.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
name: Get data from PDF file
on:
push:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *" # At 00:00 on day-of-month 1
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Installing dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "./requirements.txt"
- name: Running script
run: python fetch.py
env:
SPECIAL_OPENAI_KEY: ${{ secrets.SPECIAL_OPENAI_KEY }}
- name: Commit and push changes
run: |
git config user.name "Automated"
git config user.email "[email protected]"
git add data/
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push