Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/dbt_docs_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
branches:
- "main"
inputs:
resource_id:
description: 'DDS resource ID to refresh (defaults to repository name if not provided)'
required: false
type: string

env:
USE_VARS: "${{ vars.USE_VARS }}"
Expand All @@ -22,8 +27,7 @@ concurrency:
group: ${{ github.workflow }}

jobs:
scheduled_run:
name: docs_update
run_dbt_jobs:
runs-on: ubuntu-latest
environment:
name: workflow_prod
Expand All @@ -40,12 +44,15 @@ jobs:
run: |
pip install -r requirements.txt
dbt deps

- name: checkout docs branch
run: |
git checkout -b docs origin/main

- name: generate dbt docs
run: dbt docs generate -t prod
run: |
dbt ls -t prod
dbt docs generate --no-compile -t prod

- name: move files to docs directory
run: |
Expand All @@ -69,8 +76,19 @@ jobs:
run: |
git push -f --set-upstream origin docs

refresh-dds-cache:
needs: [run_dbt_jobs]
if: success()
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/refresh_dds.yml@main
with:
resource_id: ${{ inputs.resource_id }}
api_url: ${{ github.ref == 'refs/heads/main' && 'https://dds-api.fsc-data-platform.io' || 'https://dds-api.fsc-data-platform-stg.io' }}
force_refresh: true
secrets:
DDS_API_KEY: ${{ github.ref == 'refs/heads/main' && secrets.DDS_PROD_API_KEY || secrets.DDS_STG_API_KEY }}

notify-failure:
needs: [scheduled_run]
needs: [run_dbt_jobs]
if: failure()
uses: ./.github/workflows/slack_notify.yml
secrets:
Expand Down