-
-
Notifications
You must be signed in to change notification settings - Fork 75
38 lines (38 loc) · 1.25 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
name: scrape
on:
workflow_dispatch:
# schedule:
# - cron: '0 21 * * *'
jobs:
scrape:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out this repo
uses: actions/checkout@v4
with:
ref: main
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Installed package list
run: apt list --installed
- name: Remove Chrome
run: sudo apt purge google-chrome-stable
- name: Remove default Chromium
run: sudo apt purge chromium-browser
# Need to fetch reqs if needed
- name: Install xvfb
run: sudo apt-get install xvfb
- name: Installing all necessary packages
run: pip install chromedriver-autoinstaller selenium pyvirtualdisplay beautifulsoup4
- name: Run the scraping script
run: cd docs/games/grand_archive_gabrary_spoilers;python scraper.py;cd ../../..
- name: Auto-Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
file_pattern: docs/games/grand_archive_gabrary_spoilers/sets/
commit_message: Update docs/games/grand_archive_gabrary_spoilers/sets/gabrary_spoilers.json