Skip to content

Commit 61dd4e5

Browse files
committed
Hash all built data files for redeploy detection
1 parent 6a96f79 commit 61dd4e5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ jobs:
9191
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}
9292
run: npm run build
9393

94+
# Hash all generated data files from the build (created by npm run build-data)
95+
# to ensure we redeploy when any tools data changes
96+
- name: 'Generate Hash of built tools data'
97+
run: |
98+
echo "tools_hash=$(cat data/tools.json data/tags.json data/tool-stats.json data/tag-stats.json | sha256sum | cut -c1-7)" >> $GITHUB_ENV
99+
94100
- name: 'Configure Docker'
95101
run: gcloud auth configure-docker us-central1-docker.pkg.dev
96102

@@ -101,12 +107,6 @@ jobs:
101107
app_id: ${{ secrets.GH_APP_ID }}
102108
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
103109

104-
# Hash the generated tools.json from the build (created by npm run build-data)
105-
# to ensure we redeploy when tools data changes
106-
- name: 'Generate Hash of built tools data'
107-
run: |
108-
echo "tools_hash=$(sha256sum data/tools.json | cut -c1-7)" >> $GITHUB_ENV
109-
110110
# Also take screenshots.json into account for cache busting
111111
- name: 'Download screenshots.json File'
112112
run: curl -sL https://github.com/analysis-tools-dev/assets/raw/master/screenshots.json -o ./screenshots.json

0 commit comments

Comments
 (0)