mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-03-12 21:22:57 -07:00
Invalidate SEO deploys and fix translation script path
This commit is contained in:
6
.github/workflows/build_master.yml
vendored
6
.github/workflows/build_master.yml
vendored
@@ -177,3 +177,9 @@ jobs:
|
||||
aws s3 cp ./src/robots.txt s3://hacktricks-cloud/robots.txt --content-type text/plain --cache-control max-age=300
|
||||
aws s3 cp ./src/robots.txt s3://hacktricks-cloud/en/robots.txt --content-type text/plain --cache-control max-age=300
|
||||
|
||||
- name: Invalidate CloudFront HTML and SEO assets
|
||||
run: |
|
||||
aws cloudfront create-invalidation \
|
||||
--distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \
|
||||
--paths "/en/*" "/robots.txt" "/en/robots.txt" "/sitemap.xml" "/en/sitemap.xml"
|
||||
|
||||
|
||||
11
.github/workflows/translate_all.yml
vendored
11
.github/workflows/translate_all.yml
vendored
@@ -82,6 +82,7 @@ jobs:
|
||||
wget -O /tmp/get_and_save_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/get_and_save_refs.py
|
||||
wget -O /tmp/compare_and_fix_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/compare_and_fix_refs.py
|
||||
wget -O /tmp/translator.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/translator.py
|
||||
wget -O /tmp/seo_postprocess.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/seo_postprocess.py
|
||||
|
||||
- name: Run get_and_save_refs.py
|
||||
run: |
|
||||
@@ -257,7 +258,7 @@ jobs:
|
||||
|
||||
- name: Post-process SEO artifacts
|
||||
run: |
|
||||
python3 scripts/seo_postprocess.py pages \
|
||||
python3 /tmp/seo_postprocess.py pages \
|
||||
--book-dir ./book \
|
||||
--site-url https://cloud.hacktricks.wiki \
|
||||
--lang "$BRANCH" \
|
||||
@@ -281,5 +282,11 @@ jobs:
|
||||
if [ -z "$LANGS" ]; then
|
||||
LANGS="en"
|
||||
fi
|
||||
python3 scripts/seo_postprocess.py index --site-url https://cloud.hacktricks.wiki --languages "$LANGS" --output ./sitemap.xml
|
||||
python3 /tmp/seo_postprocess.py index --site-url https://cloud.hacktricks.wiki --languages "$LANGS" --output ./sitemap.xml
|
||||
aws s3 cp ./sitemap.xml s3://hacktricks-cloud/sitemap.xml --content-type application/xml --cache-control max-age=300
|
||||
|
||||
- name: Invalidate CloudFront HTML and SEO assets
|
||||
run: |
|
||||
aws cloudfront create-invalidation \
|
||||
--distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \
|
||||
--paths "/$BRANCH/*" "/robots.txt" "/sitemap.xml" "/$BRANCH/sitemap.xml"
|
||||
|
||||
Reference in New Issue
Block a user