From 5befa1dd0f3295cfc9ae92ef0effc38db4d96396 Mon Sep 17 00:00:00 2001 From: Peter Date: Sun, 13 Feb 2022 14:05:03 +0100 Subject: [PATCH] test --- script.sh => .github/workflows/fix_redirects.sh | 2 ++ .github/workflows/gh-pages.yml | 5 ++++- .github/workflows/renovate_check-build.yml | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) rename script.sh => .github/workflows/fix_redirects.sh (86%) diff --git a/script.sh b/.github/workflows/fix_redirects.sh similarity index 86% rename from script.sh rename to .github/workflows/fix_redirects.sh index 43bb3ec10..278445d26 100644 --- a/script.sh +++ b/.github/workflows/fix_redirects.sh @@ -1,4 +1,6 @@ #/bin/bash +cd ../../ # go in docsdir +ls -lah find ./site/ -maxdepth 2 -mindepth 2 -type f -name 'index.html' -not -path './site/de/*' -not -path './site/en/*' | while read f; do echo "Fixing redirect '$f'..." sed -i -E 's/\.en\/"/\/"/' $f diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 7feae4106..c3bdf03ec 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -24,7 +24,10 @@ jobs: - name: Build site 🔧 run: | mkdocs build --verbose --clean - bash script.sh + + - name: Fixing redirects 🚧 + run: | + bash fix_redirects.sh - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4.2.3 diff --git a/.github/workflows/renovate_check-build.yml b/.github/workflows/renovate_check-build.yml index 8a58e7eeb..6e75525e2 100644 --- a/.github/workflows/renovate_check-build.yml +++ b/.github/workflows/renovate_check-build.yml @@ -22,3 +22,7 @@ jobs: - name: Build site 🔧 run: | mkdocs build --verbose --clean + + - name: Fixing redirects 🚧 + run: | + bash fix_redirects.sh