diff --git a/.github/workflows/draft-deploy.yml b/.github/workflows/draft-deploy.yml index 99223834b8..5c6c13eb0d 100644 --- a/.github/workflows/draft-deploy.yml +++ b/.github/workflows/draft-deploy.yml @@ -30,7 +30,7 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }} with: - args: deploy --dir=dist + args: deploy --dir=dist --no-build - name: Find comment uses: peter-evans/find-comment@v3 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 336e2bcece..dbbf521272 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -31,4 +31,4 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }} with: - args: deploy --dir=dist --alias="$GITHUB_REF_NAME" + args: deploy --dir=dist --alias="$GITHUB_REF_NAME" --no-build diff --git a/src/components/LanguageSwitch.tsx b/src/components/LanguageSwitch.tsx index 14717dc518..1c239ef458 100644 --- a/src/components/LanguageSwitch.tsx +++ b/src/components/LanguageSwitch.tsx @@ -13,8 +13,9 @@ export const LanguageSwitch: FC = () => { const relativePath = normalizedPathname.startsWith(baseUrl) ? normalizedPathname.slice(baseUrl.length) : normalizedPathname; + const relativePathWithoutTrailingSlash = relativePath.replace(/\/$/, ''); const isGerman = i18n.currentLocale === 'de'; - const switchTo = `${baseUrlWithoutLanguage}${isGerman ? 'en/' : ''}${relativePath}`; + const switchTo = `${baseUrlWithoutLanguage}${isGerman ? 'en/' : ''}${relativePathWithoutTrailingSlash}`; return (
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 83e358d917..8122cb9be7 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -39,7 +39,7 @@ const HomepageButtons: FunctionComponent = () => { >