Skip to content

Commit

Permalink
set tag on release
Browse files Browse the repository at this point in the history
  • Loading branch information
balanza committed Jul 10, 2023
1 parent 72864a1 commit 447633b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ name: gh-pages

on:
push:
tags: [ "*" ]
branches: ["versione-corrente"]
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
pull_request:
branches: [ "*" ]
branches: ["*"]
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
release:
types:
- created
- edited

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -45,10 +48,17 @@ jobs:
- name: Build branch
run: |-
[[ "$GITHUB_REF" != "versione_corrente" ]] && P="${GITHUB_REF}/" || P="" # note the trailing slash
echo "Publish on $P sub path"
sphinx-build -b html docs/it/ html/$Pit
sphinx-build -b html docs/en/ html/$Pen
if [[ "$GITHUB_REF" = /refs/tags/* ]]; then
replace=/refs/tags/
TAG=$(echo "$GITHUB_REF" | sed "s/\/refs\/tags\///")
SUBPATH="v$TAG/" # note the trailing slash
else
SUBPATH="${GITHUB_HEAD_REF}/" # note the trailing slash
fi
echo "Publish on $SUBPATH sub path"
sphinx-build -b html docs/it/ html/$SUBPATHit
sphinx-build -b html docs/en/ html/$SUBPATHen
# Runs a single command using the runners shell
- name: Create GH page index
Expand Down

0 comments on commit 447633b

Please sign in to comment.