Run get_congressional_voting_history.py #9
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 get_congressional_voting_history.py | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' # monthly cron job | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'scripts/get_congressional_voting_history.py' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
run_get_congressional_voting_history: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10. | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10.13 | |
cache: 'pip' | |
- name: install python environment | |
run: pip install -r requirements.txt | |
- name: 'Create env file' | |
run: echo "${{ secrets.ENV_FILE }}" > .env | |
- name: Run get_congressional_voting_history.py | |
env: | |
ENV: ${{ github.ref == 'refs/heads/main' && 'prod' || 'staging' }} | |
BIGQUERY_CREDS: ${{ secrets.BIGQUERY_CREDS }} | |
run: python -m scripts.get_congressional_voting_history |