Skip to content

Commit 63594e9

Browse files
committed
fix(docs): re-enable version caching in V2 deploy
Re-enable the version docs cache with an updated key that includes docs/layouts/shortcodes/** so shortcode template changes bust the cache. JIRA: trivial risk: nonprod
1 parent cc20711 commit 63594e9

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/netlify-deploy-v2.yaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,36 @@ jobs:
3939
SHA=$(gh api "repos/${{ github.repository }}/git/ref/heads/${{ matrix.version.branch }}" -q '.object.sha')
4040
echo "sha=$SHA" >> $GITHUB_OUTPUT
4141
echo "Branch ${{ matrix.version.branch }} -> section ${{ matrix.version.section }} (SHA: $SHA)"
42-
# TODO: re-enable once the pipeline is stable
43-
# - name: Cache version docs
44-
# id: cache
45-
# uses: actions/cache@v4
46-
# with:
47-
# path: docs/versioned_docs/${{ matrix.version.section }}
48-
# key: version-docs-${{ hashFiles('scripts/docs/*.py', 'scripts/docs/templates/**', 'docs/*_template.md') }}-${{ matrix.version.section }}-${{ steps.sha.outputs.sha }}
42+
- name: Cache version docs
43+
id: cache
44+
uses: actions/cache@v4
45+
with:
46+
path: docs/versioned_docs/${{ matrix.version.section }}
47+
key: version-docs-${{ hashFiles('scripts/docs/*.py', 'scripts/docs/templates/**', 'docs/*_template.md', 'docs/layouts/shortcodes/**') }}-${{ matrix.version.section }}-${{ steps.sha.outputs.sha }}
4948
- name: Checkout
50-
49+
if: steps.cache.outputs.cache-hit != 'true'
5150
uses: actions/checkout@v4
5251
- name: Fetch target branch
53-
52+
if: steps.cache.outputs.cache-hit != 'true'
5453
run: git fetch origin ${{ matrix.version.branch }}
5554
- name: Checkout branch packages
56-
55+
if: steps.cache.outputs.cache-hit != 'true'
5756
run: |
5857
git checkout origin/${{ matrix.version.branch }} -- gooddata-api-client/ packages/gooddata-sdk/ packages/gooddata-pandas/
5958
- name: Setup Python
60-
59+
if: steps.cache.outputs.cache-hit != 'true'
6160
uses: actions/setup-python@v5
6261
with:
6362
python-version-file: ".python-version"
6463
cache: 'pip'
6564
cache-dependency-path: scripts/script-requirements.txt
6665
- name: Install Dependencies
67-
66+
if: steps.cache.outputs.cache-hit != 'true'
6867
run: |
6968
python -m pip install --upgrade pip
7069
pip install -r scripts/script-requirements.txt
7170
- name: Generate version docs
72-
71+
if: steps.cache.outputs.cache-hit != 'true'
7372
run: bash scripts/generate-single-version.sh "origin/${{ matrix.version.branch }}" "${{ matrix.version.section }}"
7473
- name: Upload version artifact
7574
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)