-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.44 KB
/
scraper_linkedin.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
name: Scrape Linkedin
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Checking out repo
uses: actions/checkout@v3
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Installing package list
run: apt list --installed
- name: Removing previous chrome instances on runner
run: sudo apt purge google-chrome-stable
# Need to fetch reqs if needed
- name: Installing all necessary packages
run: pip install pandas chromedriver-autoinstaller selenium pyvirtualdisplay webdriver_manager linkedin_jobs_scraper
- name: Install xvfb
run: sudo apt-get install xvfb
- name: Running the Python script
run: python online_scraper.py
- name: Commit files
run: |
git config --local user.name github-actions
git config --local user.email "[email protected]"
git add -A
git diff-index --quiet HEAD || git commit -m 'update'
env:
REPO_KEY: ${{secrets.GITHUB_TOKEN}}
username: github-actions
- name: push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
# git add data/*
# git commit -am "GH ACTION Autorun $(date)"
# git push origin main