run google-trends.py #309
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run google-trends.py | |
on: | |
schedule: | |
- cron: '30 13 * * *' # Runs every day at 19:00 PM IST | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v3 # checkout the repository content to GitHub runner | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' # install the python version needed | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: execute py script # run google_trends.py | |
run: python google_trends.py | |
env: | |
SERPAPI_KEY: ${{ secrets.SERPAPI_KEY }} | |
LOCATION: ${{ secrets.LOCATION }} | |
DB_NAME: ${{ secrets.DB_NAME }} | |
DB_USER: ${{ secrets.DB_USER }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |