From b22739ecfb21b195fc09ecc9106f9acb48d11b62 Mon Sep 17 00:00:00 2001 From: yulike Date: Fri, 2 Dec 2022 10:27:16 -0500 Subject: [PATCH] updated profile --- .github/workflows/dbt_docs_updates.yml | 64 -------------------------- .github/workflows/dbt_run_template.yml | 48 ------------------- .gitignore | 3 +- 3 files changed, 2 insertions(+), 113 deletions(-) delete mode 100644 .github/workflows/dbt_docs_updates.yml delete mode 100644 .github/workflows/dbt_run_template.yml diff --git a/.github/workflows/dbt_docs_updates.yml b/.github/workflows/dbt_docs_updates.yml deleted file mode 100644 index d4ac543..0000000 --- a/.github/workflows/dbt_docs_updates.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: docs_update - -on: - workflow_call: - -env: - ACCOUNT: "${{ secrets.ACCOUNT }}" - ROLE: "${{ secrets.ROLE }}" - USER: "${{ secrets.USER }}" - PASSWORD: "${{ secrets.PASSWORD }}" - REGION: "${{ secrets.REGION }}" - DATABASE_DEV: "${{ secrets.DATABASE_DEV }}" - DATABASE_PROD: "${{ secrets.DATABASE_PROD }}" - WAREHOUSE_DEV: "${{ secrets.WAREHOUSE_DEV }}" - WAREHOUSE_PROD: "${{ secrets.WAREHOUSE_PROD }}" - SCHEMA: "${{ secrets.SCHEMA }}" - -jobs: - scheduled_run: - name: docs_update - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v1 - with: - python-version: "3.7.x" - - - name: install dependencies - run: | - pip install dbt-snowflake - dbt deps - - name: delete existing docs branch - run: git push origin --delete docs || true - - - name: checkout docs branch - run: | - git checkout -b docs - git push --set-upstream origin docs - - name: generate dbt docs - run: dbt docs generate -t prod --profiles-dir ./.dbt - - - name: move files to docs directory - run: | - mkdir -p ./docs - cp target/{catalog.json,manifest.json,index.html} docs/ - - name: clean up target directory - run: dbt clean - - - name: check for changes - run: git status - - - name: stage changed files - run: git add . - - - name: commit changed files - run: | - git config user.email "abc@xyz" - git config user.name "github-actions" - git commit -am "Auto-update docs" - - name: push changes to docs - run: | - git push \ No newline at end of file diff --git a/.github/workflows/dbt_run_template.yml b/.github/workflows/dbt_run_template.yml deleted file mode 100644 index 8d34523..0000000 --- a/.github/workflows/dbt_run_template.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: dbt_run_template - -on: - workflow_call: - inputs: - dbt_command: - type: string - description: 'dbt commands to run' - required: true - -env: - DBT_PROFILES_DIR: ./ - - ACCOUNT: "${{ secrets.ACCOUNT }}" - ROLE: "${{ secrets.ROLE }}" - USER: "${{ secrets.USER }}" - PASSWORD: "${{ secrets.PASSWORD }}" - REGION: "${{ secrets.REGION }}" - DATABASE_DEV: "${{ secrets.DATABASE_DEV }}" - DATABASE_PROD: "${{ secrets.DATABASE_PROD }}" - WAREHOUSE_DEV: "${{ secrets.WAREHOUSE_DEV }}" - WAREHOUSE_PROD: "${{ secrets.WAREHOUSE_PROD }}" - SCHEMA: "${{ secrets.SCHEMA }}" - -jobs: - run_dbt_jobs: - runs-on: ubuntu-latest - environment: - name: workflow - strategy: - matrix: - command: ${{fromJson(inputs.dbt_command)}} - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v1 - with: - python-version: "3.7.x" - - - name: install dependencies - run: | - pip3 install dbt-snowflake cli_passthrough requests click - dbt deps - - - name: Run DBT Jobs - run: | - ${{ matrix.command }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index cd78447..ef82cbd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -temp/ \ No newline at end of file +temp/ +models_yml/ \ No newline at end of file