-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (86 loc) · 2.96 KB
/
daily_job_board_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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Daily Python Script
on:
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
jobs:
run_script:
name: Call Scrapy Script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Scrapy script
run: |
cd job_board_scraper
python run_job_scraper.py
python get_ashby_jobs.py
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
HASHIDS_SALT: ${{ secrets.HASHIDS_SALT }}
PAGES_TO_SCRAPE_QUERY: ${{ secrets.PAGES_TO_SCRAPE_QUERY }}
ASHBY_PAGES_TO_SCRAPE_QUERY: ${{ secrets.ASHBY_PAGES_TO_SCRAPE_QUERY }}
PG_DATABASE: ${{ secrets.PG_DATABASE }}
PG_HOST: ${{ secrets.PG_HOST }}
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
PG_USER: ${{ secrets.PG_USER }}
CHUNK_SIZE: ${{ secrets.CHUNK_SIZE }}
RAW_HTML_S3_BUCKET: ${{ secrets.RAW_HTML_S3_BUCKET }}
run_rippling_script:
name: Call Rippling Script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Rippling Script
run: |
cd job_board_scraper
python get_rippling_jobs.py rippling
env:
HASHIDS_SALT: ${{ secrets.HASHIDS_SALT }}
PG_DATABASE: ${{ secrets.PG_DATABASE }}
PG_HOST: ${{ secrets.PG_HOST }}
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
PG_USER: ${{ secrets.PG_USER }}
PG_PORT: ${{ secrets.PG_PORT }}
GET_BOARD_TOKENS_BASE_QUERY: ${{ secrets.GET_BOARD_TOKENS_BASE_QUERY }}
RIPPLING_JOBS_OUTLINE_TABLE_NAME: ${{ secrets.RIPPLING_JOBS_OUTLINE_TABLE_NAME }}
run_dbt:
name: Run dbt
needs: [run_script, run_rippling_script]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install dbt dependencies
run: cd levergreen_dbt && dbt deps
- name: Build dbt models
run: cd levergreen_dbt && dbt run
env:
PG_DATABASE: ${{ secrets.PG_DATABASE }}
PG_HOST: ${{ secrets.PG_HOST }}
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
PG_USER: ${{ secrets.PG_USER }}