update docs update

This commit is contained in:
tarikceric 2025-12-15 18:48:56 -08:00
parent fd708384af
commit 85c0ae7de0

View File

@ -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 }}"
@ -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
@ -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: |
@ -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: