-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (42 loc) · 1.35 KB
/
main.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
name: Daily Run
on:
schedule:
- cron: '40 11 * * *' # Runs every day at 6:40 AM EST (11:40 UTC)
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Update system dependencies
run: sudo apt-get update
- name: Remove Chrome
run: sudo apt purge google-chrome-stable
- name: Install Google Chrome
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
# Set up Chromedriver to match the installed version of Chrome
- name: Setup Chromedriver
uses: nanasess/setup-chromedriver@v2
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run script
run: python run_scraper.py
- name: Configure git
run: |
git config --global user.email "actions-user@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Commit changes
env:
TZ: America/New_York
run: |
CURRENT_DATE=$(date +"%m/%d/%Y")
git add .
git commit -m "run ($CURRENT_DATE)" -a || echo "No changes to commit"
git push