Skip to content

Run dbt

Run dbt #13

Workflow file for this run

name: Run dbt
on:
schedule:
- cron: '0 1 * * 2' # Dedup at 1 AM every Tuesday
workflow_dispatch: # Allows manual triggering
push:
paths:
- 'dbt_comp/**' # Trigger on push to any file in the dbt_comp folder
env:
DBT_PROFILES_DIR: ./dbt_pcomp
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
GCP_CREDENTIALS_FILE: ./dbt_pcomp/dbt-service-account.json
jobs:
dbt-run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Specify the Python version you need
- name: Install dependencies
run: |
pip install -r ./dbt_pcomp/requirements.txt
- name: Service account key to json file
run: 'echo "$GCP_CREDENTIALS" > "$GCP_CREDENTIALS_FILE"'
shell: bash
- name: Run dbt
run: |
dbt run --project-dir ./dbt_pcomp