Skip to content

Commit 1756a83

Browse files
Fix sitemap search/replace
1 parent 4f89c4d commit 1756a83

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/build-production-site.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ jobs:
218218
cd public
219219
cp sitemap.xml ${{ vars.DUPE_SITEMAP_NAME }}
220220
221+
SED_ESCAPED_URL=$(echo ${{ secrets.DOCS_WEBSITE_URL }} | sed 's|\.|\\\.|g')
222+
sed -i "s|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g" ${{ vars.DUPE_SITEMAP_NAME }}
223+
sed -i "s|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|g" ${{ vars.DUPE_SITEMAP_NAME }}
224+
221225
# Make a tarball of the site, because it will upload much, much quicker
222226
# than the uncompressed rendered site. The commit for this workflow run
223227
# is encoded in the name of the tarball.

.github/workflows/build-staging-site.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ jobs:
225225
cd public
226226
cp sitemap.xml ${{ vars.DUPE_SITEMAP_NAME }}
227227
228+
SED_ESCAPED_URL=$(echo ${{ secrets.DOCS_WEBSITE_URL }} | sed 's|\.|\\\.|g')
229+
sed -i "s|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g" ${{ vars.DUPE_SITEMAP_NAME }}
230+
sed -i "s|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|g" ${{ vars.DUPE_SITEMAP_NAME }}
231+
228232
# Make a tarball of the site, because it will upload much, much quicker
229233
# than the uncompressed rendered site. The commit for this workflow run
230234
# is encoded in the name of the tarball.

.github/workflows/build-testing-site.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ jobs:
226226
cd public
227227
cp sitemap.xml ${{ vars.DUPE_SITEMAP_NAME }}
228228
SED_ESCAPED_URL=$(echo ${{ secrets.DOCS_WEBSITE_URL }} | sed 's|\.|\\\.|g')
229-
sed -i 's|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g' ${{ vars.DUPE_SITEMAP_NAME }}
230-
sed -i 's|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|' ${{ vars.DUPE_SITEMAP_NAME }}
229+
sed -i "s|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g" ${{ vars.DUPE_SITEMAP_NAME }}
230+
sed -i "s|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|g" ${{ vars.DUPE_SITEMAP_NAME }}
231231
232232
# Make a tarball of the site, because it will upload much, much quicker
233233
# than the uncompressed rendered site. The commit for this workflow run

0 commit comments

Comments
 (0)