From 82909dae2f4192d6562531a49797f2238ab2db9c Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Tue, 8 Oct 2024 10:31:31 -0400 Subject: [PATCH] PXBF-dev: Add step in deploy pipe to add lines to redirects in usagov submod 15 --- .github/workflows/build-and-deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 8fd07eb79..b9976aa11 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -137,8 +137,9 @@ jobs: git submodule update cd usagov-2021 git checkout prod - - name: + - name: Routing Testing run: | + sed -i '/^$/d' ./usagov-2021/.docker/src-waf/etc/nginx/snippets/domain-rewrites-benefits-tool.conf sed -i '/# Rewrites for requests for Host: benefits-tool.usa.gov/ a\ rewrite ^/benefit-finder/([^/]+)/[^/]+$ /benefit-finder/$1 permanent;\n rewrite ^/espanol/benefit-finder/([^/]+)/[^/]+$ /espanol/benefit-finder/$1 permanent;' ./usagov-2021/.docker/src-waf/etc/nginx/snippets/domain-rewrites-benefits-tool.conf sed -i '/^ rewrite ^\/espanol\/benefit-finder\/([^\/]+)\/[^\/]+$/N;s/\n$//' ./usagov-2021/.docker/src-waf/etc/nginx/snippets/domain-rewrites-benefits-tool.conf sed -i '1a\\' ./usagov-2021/.docker/src-waf/etc/nginx/snippets/domain-rewrites-benefits-tool.conf