From 1f11baf1ca9913fa60c7ff04e82e1064739afb6d Mon Sep 17 00:00:00 2001 From: Jean Cochrane Date: Tue, 29 Aug 2023 09:57:56 -0500 Subject: [PATCH] Restore dbt cache in deploy-dbt-docs to ensure it can run on PRs --- .github/workflows/deploy_dbt_docs.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_dbt_docs.yaml b/.github/workflows/deploy_dbt_docs.yaml index 40f9e943b..d1c1e2606 100644 --- a/.github/workflows/deploy_dbt_docs.yaml +++ b/.github/workflows/deploy_dbt_docs.yaml @@ -28,6 +28,14 @@ jobs: with: role-to-assume: ${{ secrets.AWS_IAM_ROLE_TO_ASSUME_ARN }} + - name: Restore dbt state cache + id: cache + uses: ./.github/actions/restore_dbt_cache + with: + path: ${{ env.PROJECT_DIR }}/${{ env.STATE_DIR }} + key: ${{ env.CACHE_KEY }} + restore-key: ${{ env.CACHE_RESTORE_KEY }} + - name: Setup node uses: actions/setup-node@v3 @@ -43,7 +51,7 @@ jobs: shell: bash - name: Generate docs - run: dbt docs generate --target "$TARGET" + run: dbt docs generate --target "$TARGET" --defer --state "$STATE_DIR" working-directory: ${{ env.PROJECT_DIR }} shell: bash