-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.88 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: scrape
on:
schedule:
- cron: '5 * * * *' # Each day At 11:05 Ref https://crontab.guru/examples.html
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8
#----------------------------------------------
# ----- install python req -----
#----------------------------------------------
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: 'pip'
- run: pip install -r requirements.txt
#----------------------------------------------
# ----- decrypt -----
#----------------------------------------------
- name: Decrypt large secret
run: ./.github/scripts/decrypt_secret.sh
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
# This command is just an example to show your secret being printed
# Ensure you remove any print statements of your secrets. GitHub does
# not hide secrets that use this workaround.
#----------------------------------------------
# run scrape
#----------------------------------------------
- name: Scrape
run: |
python scrape.py
python to_spreadsheet.py
#----------------------------------------------
# publish to github
#----------------------------------------------
- uses: mikeal/publish-to-github-action@master
env:
BRANCH_NAME: 'main'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}