-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.21 KB
/
automation.yml
File metadata and controls
41 lines (34 loc) · 1.21 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
name: automation
on:
schedule:
# The original '0 0 10 * *' ran once a month.
- cron: '0 0 1 1,4,7,10 *'
workflow_dispatch: # Allows you to run it manually
# Required permissions for the built-in GITHUB_TOKEN to push changes
permissions:
contents: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
# This action automatically uses the properly-permissioned GITHUB_TOKEN
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install necessary packages
run: |
# Note: sudo apt-get can be slow. If possible, manage dependencies
# with Python's pip where you can.
sudo apt-get update
sudo apt-get install -y chromium-browser
pip install requests beautifulsoup4 pandas webdriver-manager selenium
- name: Run the scraping script
run: python scraper.py
- name: Commit and push changes
# This action will automatically commit and push any new or modified files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Automated data scrape"