mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 06:35:52 +00:00
Log cleaning branch names
This commit is contained in:
parent
b46a30b33a
commit
8103e51451
1 changed files with 6 additions and 2 deletions
8
.github/workflows/deploy-book-ghpages.yml
vendored
8
.github/workflows/deploy-book-ghpages.yml
vendored
|
|
@ -41,10 +41,14 @@ jobs:
|
||||||
name: Set branches
|
name: Set branches
|
||||||
run: |
|
run: |
|
||||||
if [ "$BRANCHES_TO_DEPLOY" == '*' ]; then
|
if [ "$BRANCHES_TO_DEPLOY" == '*' ]; then
|
||||||
branches=$(git branch -r | sed 's,\s*origin/,,g' | jq -Rn '[inputs]')
|
branches=$(git branch -r | sed 's,\s*origin/,,g')
|
||||||
else
|
else
|
||||||
branches=$(echo "$BRANCHES_TO_DEPLOY" | tr ' ' '\n' | grep -E '\S' | jq -Rn '[inputs]')
|
branches=$(echo "$BRANCHES_TO_DEPLOY" | tr ' ' '\n' | grep -E '\S')
|
||||||
fi
|
fi
|
||||||
|
echo "$branches" > raw.txt
|
||||||
|
echo "$branches" | tr '/":<>|*?\/\\' '-' > clean.txt
|
||||||
|
paste -d ' ' raw.txt clean.txt | sed 's/ / -> /g'
|
||||||
|
branches=$(echo "$branches" | jq -Rn '[inputs]')
|
||||||
echo "branches=$(echo $branches)" >> $GITHUB_OUTPUT
|
echo "branches=$(echo $branches)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-books:
|
build-books:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue