Skip to content

11232567964 generate docs #12

11232567964 generate docs

11232567964 generate docs #12

Workflow file for this run

name: Generate DBT Docs
run-name: ${{ github.run_id }} generate docs
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: 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 Workflow Generate DBT docs"
git push https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/GuillaumeGSicara/dbt-snowflake-cortex.git