-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.27 KB
/
scrape.yml
File metadata and controls
51 lines (41 loc) · 1.27 KB
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
name: scrape
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
scrape-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check Chrome and Chromedriver versions
run: |
google-chrome-stable --product-version
chromedriver --version
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run scraper script
run: |
CHROME_VERSION=$(google-chrome --product-version) python script.py
- name: Commit and push changes
id: commit_and_push
uses: EndBug/add-and-commit@v9
with:
message: "action: update car data"
default_author: github_actions
# - name: Get sha of latest commit and send notification
# run: >
# curl
# -H "Title: Car Repo Scraper"
# -H "Tags: car"
# -H "Click: https://github.com/sphars/car-repo-scraper/commit/${{ steps.commit_and_push.outputs.commit_sha }}/"
# -d "Data updated"
# ntfy.sh/utah-car-repos