mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 06:35:52 +00:00
Clean branch name from spec chars
This commit is contained in:
parent
56b155c59e
commit
70b333585e
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
|
|
@ -48,7 +48,7 @@ jobs:
|
||||||
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' | jq -Rn '[inputs]')
|
||||||
else
|
else
|
||||||
branches=$(echo $BRANCHES_TO_DEPLOY | tr ' ' '\n' | jq -Rn '[inputs]')
|
branches=$(echo "$BRANCHES_TO_DEPLOY" | tr ' ' '\n' | grep -E '\S' | jq -Rn '[inputs]')
|
||||||
fi
|
fi
|
||||||
echo "branches=$(echo $branches)" >> $GITHUB_OUTPUT
|
echo "branches=$(echo $branches)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
@ -100,10 +100,14 @@ jobs:
|
||||||
cat book/_toc.yml
|
cat book/_toc.yml
|
||||||
jupyter-book build book/
|
jupyter-book build book/
|
||||||
|
|
||||||
|
- name: Clean branch name of disallowed characters
|
||||||
|
run: |
|
||||||
|
echo "MATRIX_BRANCH_NAME_CLEAN=$(echo ${{ matrix.branch }} | tr '/":<>|*?\/\\' '-')" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload the built book HTML as an artifact
|
- name: Upload the built book HTML as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.branch }}
|
name: ${{ env.MATRIX_BRANCH_NAME_CLEAN }}
|
||||||
path: "book/_build/html"
|
path: "book/_build/html"
|
||||||
|
|
||||||
deploy-books:
|
deploy-books:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue