deploy documentation site #24
This file contains 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: deploy documentation site | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Document version e.g. 1.1, 1.2 | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: 1.7.1 | |
- name: Install dependencies | |
run: | | |
poetry config installer.max-workers 1 | |
poetry config virtualenvs.in-project true | |
poetry install | |
- name: Build the docs site | |
run: | | |
mkdir -p ~/.dbt | |
cp integration_tests/ci/ci.profiles.yml ~/.dbt/profiles.yml | |
poetry run poe build-doc | |
env: | |
DBT_SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.DBT_SNOWFLAKE_TEST_ACCOUNT }} | |
DBT_SNOWFLAKE_TEST_USER: ${{ secrets.DBT_SNOWFLAKE_TEST_USER }} | |
DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD: ${{ secrets.DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD }} | |
DBT_SNOWFLAKE_TEST_ROLE: ${{ secrets.DBT_SNOWFLAKE_TEST_ROLE }} | |
DBT_SNOWFLAKE_TEST_DATABASE: ${{ secrets.DBT_SNOWFLAKE_TEST_DATABASE }} | |
DBT_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.DBT_SNOWFLAKE_TEST_WAREHOUSE }} | |
DBT_SCHEMA: DOCS | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Publish site | |
run: | | |
poetry run mike deploy --push --update-aliases ${{ inputs.version }} latest | |
env: | |
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} |