Skip to content

Merge pull request #481 from cagov/summer-unique-keys-imputation #163

Merge pull request #481 from cagov/summer-unique-keys-imputation

Merge pull request #481 from cagov/summer-unique-keys-imputation #163

Workflow file for this run

name: docs
on:
push:
branches:
- main
permissions:
contents: write
env:
DBT_PROFILES_DIR: transform/ci
DBT_RAW_DB: RAW_PRD
DBT_ANALYTICS_DB: ANALYTICS_PRD
PRIVATE_KEY: ${{ SECRETS.SNOWFLAKE_PRIVATE_KEY_PRD }}
SNOWFLAKE_USER: ${{ SECRETS.SNOWFLAKE_USER_PRD }}
SNOWFLAKE_ACCOUNT: ${{ SECRETS.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_PRIVATE_KEY_PATH: /tmp/private_key.p8
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
# TODO: once we are on dbt-snowflake 1.5, no need to pipe to a file, we can
# just use $SNOWFLAKE_PRIVATE_KEY
- name: Set up private key
run: echo "$PRIVATE_KEY" > $SNOWFLAKE_PRIVATE_KEY_PATH
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Install dependencies
run: |
poetry install
- name: Build dbt docs
run: |
dbt deps --project-dir=transform
dbt docs generate --project-dir=transform --target=prd
cp -r transform/target docs/dbt_docs
- run: mkdocs gh-deploy --force