Skip to content

11780366570 generate docs #21

11780366570 generate docs

11780366570 generate docs #21

Workflow file for this run

name: Generate DBT Docs
run-name: ${{ github.run_id }} generate docs
on:
push:
branches:
- main
paths:
- 'dbt_app/**'
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ vars.PYTHON_VERSION }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
python --version
pip install -r requirements.txt
- name: install dbt-deps
run: |
cd dbt_app
dbt deps
- name: Write dbt profile to file
run: |
mkdir -p ~/.dbt
echo "${{ secrets.SNOWFLAKE_DBT_PROFILE }}" > ~/.dbt/profiles.yml
- name: Generate documentation
run: |
cd dbt_app/; dbt docs generate --static; mv ./target/static_index.html ../docs/index.html
- name: Commit and push changes
run: |
git config --global user.email "guillaume.gonde@theodo.com"
git config --global user.name "GuillaumeGSicara_GithubWorkflow"
git add ./docs/index.html
git commit -m "Github Actions: Generate DBT docs"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/GuillaumeGSicara/dbt-snowflake-cortex.git