Streamlit and notebook docs #292
  
    
      This file contains hidden or 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: docs | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| env: | |
| DBT_PROFILES_DIR: ci | |
| SNOWFLAKE_PRIVATE_KEY: ${{ SECRETS.SNOWFLAKE_PRIVATE_KEY_DEV }} | |
| SNOWFLAKE_USER: GITHUB_ACTIONS_SVC_USER_DEV | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-path: .venv | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-root | |
| - name: Build dbt docs | |
| run: | | |
| # Generate snowflake dbt docs | |
| poetry run dbt deps --project-dir=transform | |
| poetry run dbt docs generate --project-dir=transform | |
| cp -r transform/target docs/dbt_docs_snowflake | |
| - name: Deploy docs to GitHub Pages | |
| if: github.ref == 'refs/heads/main' | |
| run: poetry run mkdocs gh-deploy --force |