Skip to content

Commit 234bd83

Browse files
committed
Invalidate SEO deploys and fix translation script path
1 parent 6a9b95f commit 234bd83

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/build_master.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,10 @@ jobs:
176176
run: |
177177
aws s3 cp ./src/robots.txt s3://hacktricks-cloud/robots.txt --content-type text/plain --cache-control max-age=300
178178
aws s3 cp ./src/robots.txt s3://hacktricks-cloud/en/robots.txt --content-type text/plain --cache-control max-age=300
179+
180+
- name: Invalidate CloudFront HTML and SEO assets
181+
run: |
182+
aws cloudfront create-invalidation \
183+
--distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \
184+
--paths "/en/*" "/robots.txt" "/en/robots.txt" "/sitemap.xml" "/en/sitemap.xml"
179185

.github/workflows/translate_all.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
wget -O /tmp/get_and_save_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/get_and_save_refs.py
8383
wget -O /tmp/compare_and_fix_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/compare_and_fix_refs.py
8484
wget -O /tmp/translator.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/translator.py
85+
wget -O /tmp/seo_postprocess.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/seo_postprocess.py
8586
8687
- name: Run get_and_save_refs.py
8788
run: |
@@ -257,7 +258,7 @@ jobs:
257258

258259
- name: Post-process SEO artifacts
259260
run: |
260-
python3 scripts/seo_postprocess.py pages \
261+
python3 /tmp/seo_postprocess.py pages \
261262
--book-dir ./book \
262263
--site-url https://cloud.hacktricks.wiki \
263264
--lang "$BRANCH" \
@@ -281,5 +282,11 @@ jobs:
281282
if [ -z "$LANGS" ]; then
282283
LANGS="en"
283284
fi
284-
python3 scripts/seo_postprocess.py index --site-url https://cloud.hacktricks.wiki --languages "$LANGS" --output ./sitemap.xml
285+
python3 /tmp/seo_postprocess.py index --site-url https://cloud.hacktricks.wiki --languages "$LANGS" --output ./sitemap.xml
285286
aws s3 cp ./sitemap.xml s3://hacktricks-cloud/sitemap.xml --content-type application/xml --cache-control max-age=300
287+
288+
- name: Invalidate CloudFront HTML and SEO assets
289+
run: |
290+
aws cloudfront create-invalidation \
291+
--distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \
292+
--paths "/$BRANCH/*" "/robots.txt" "/sitemap.xml" "/$BRANCH/sitemap.xml"

0 commit comments

Comments
 (0)