From 5886cbb23350ab7bb37d1b8594763354f9ffb72f Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sun, 5 May 2024 13:40:54 +0200 Subject: [PATCH 1/3] fix(ci): added local variable REF_NAME for escaping slashes in sed --- .github/workflows/documentation.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 6c69467..d92e50a 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -23,7 +23,8 @@ jobs: - name: Generate Documentation run: | - sed -i.bak "s/title:\(.*\)/title:\1 (${{ github.ref }})/g" .jazzy.yaml + REF_NAME=${{ github.ref }} + sed -i.bak "s/title:\(.*\)/title:\1 ($REF_NAME)/g" .jazzy.yaml bundle exec jazzy - name: Fix Invalid URLs From 5f8b9b389566b93d34ce3d67e4af6e1914658cb1 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sun, 5 May 2024 13:50:09 +0200 Subject: [PATCH 2/3] fix(ci): added local variable REF_NAME for escaping slashes in sed --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index d92e50a..237e5c0 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -23,7 +23,7 @@ jobs: - name: Generate Documentation run: | - REF_NAME=${{ github.ref }} + REF_NAME="${{ github.ref }}" sed -i.bak "s/title:\(.*\)/title:\1 ($REF_NAME)/g" .jazzy.yaml bundle exec jazzy From bec4327c00e3555f44f9b0699c687704ccc7f4d6 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sun, 5 May 2024 13:53:17 +0200 Subject: [PATCH 3/3] WIP --- .github/workflows/documentation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 237e5c0..a14624a 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -23,8 +23,8 @@ jobs: - name: Generate Documentation run: | - REF_NAME="${{ github.ref }}" - sed -i.bak "s/title:\(.*\)/title:\1 ($REF_NAME)/g" .jazzy.yaml + ESCAPED_REF_NAME=$(echo "${{ github.ref }}" | sed 's/[\/&]/\\&/g') + sed -i.bak "s/title:\(.*\)/title:\1 ($ESCAPED_REF_NAME)/g" .jazzy.yaml bundle exec jazzy - name: Fix Invalid URLs