Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable sitemap generation. #829

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions .github/workflows/content-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,52 +207,52 @@ jobs:
ls -l
fi

- name: Build sitemap
run: |
cd main && yarn build:sitemap
cd out
if [ -f sitemap.xml ]; then
echo "File found!"
cp sitemap.xml sitemap-nb.xml
else
touch sitemap-nb.xml
fi
shell: bash

- name: setup bucket descriptor
id: bucket-descriptor
run: |
if [ "${{ inputs.build_type }}" == 'dev' ]; then
echo NEXT_SITEMAP_LOCATION="https://dev.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
echo OLD_SITEMAP_LOCATION="https://dev.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
elif [ "${{ inputs.build_type }}" == 'staging'] ; then
echo NEXT_SITEMAP_LOCATION="https://staging.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
echo OLD_SITEMAP_LOCATION="https://staging.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
elif [ "${{ inputs.build_type }}" == 'prod' ]; then
echo NEXT_SITEMAP_LOCATION="https://www.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
echo OLD_SITEMAP_LOCATION="https://www.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
else
echo NEXT_SITEMAP_LOCATION="https://www.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
echo OLD_SITEMAP_LOCATION="https://www.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
fi
shell: bash

- name: Generate new sitemap
run: |
cd main
cd out
echo "${{steps.bucket-descriptor.outputs.OLD_SITEMAP_LOCATION}}"
cat <<'EOF' >> sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>${{steps.bucket-descriptor.outputs.NEXT_SITEMAP_LOCATION}}</loc>
</sitemap>
<sitemap>
<loc>${{steps.bucket-descriptor.outputs.OLD_SITEMAP_LOCATION}}</loc>
</sitemap>
</sitemapindex>
EOF
# - name: Build sitemap
# run: |
# cd main && yarn build:sitemap
# cd out
# if [ -f sitemap.xml ]; then
# echo "File found!"
# cp sitemap.xml sitemap-nb.xml
# else
# touch sitemap-nb.xml
# fi
# shell: bash

# - name: setup bucket descriptor
# id: bucket-descriptor
# run: |
# if [ "${{ inputs.build_type }}" == 'dev' ]; then
# echo NEXT_SITEMAP_LOCATION="https://dev.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
# echo OLD_SITEMAP_LOCATION="https://dev.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
# elif [ "${{ inputs.build_type }}" == 'staging'] ; then
# echo NEXT_SITEMAP_LOCATION="https://staging.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
# echo OLD_SITEMAP_LOCATION="https://staging.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
# elif [ "${{ inputs.build_type }}" == 'prod' ]; then
# echo NEXT_SITEMAP_LOCATION="https://www.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
# echo OLD_SITEMAP_LOCATION="https://www.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
# else
# echo NEXT_SITEMAP_LOCATION="https://www.va.gov/sitemap-nb.xml" >> $GITHUB_OUTPUT
# echo OLD_SITEMAP_LOCATION="https://www.va.gov/sitemap-cb.xml" >> $GITHUB_OUTPUT
# fi
# shell: bash

# - name: Generate new sitemap
# run: |
# cd main
# cd out
# echo "${{steps.bucket-descriptor.outputs.OLD_SITEMAP_LOCATION}}"
# cat <<'EOF' >> sitemap.xml
# <?xml version="1.0" encoding="UTF-8"?>
# <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
# <sitemap>
# <loc>${{steps.bucket-descriptor.outputs.NEXT_SITEMAP_LOCATION}}</loc>
# </sitemap>
# <sitemap>
# <loc>${{steps.bucket-descriptor.outputs.OLD_SITEMAP_LOCATION}}</loc>
# </sitemap>
# </sitemapindex>
# EOF


- name: Configure AWS Credentials
Expand Down
Loading