Skip to content

Commit fefbc6f

Browse files
author
a.pirogov
committed
fix: substitute slash from branch name for gitlab pages
1 parent b3fcc5c commit fefbc6f

File tree

1 file changed

+2
-1
lines changed
  • src/fair_python_cookiecutter/template/{{ cookiecutter.project_slug }}

1 file changed

+2
-1
lines changed

src/fair_python_cookiecutter/template/{{ cookiecutter.project_slug }}/.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ pages:
132132
- git config user.email $GITLAB_USER_EMAIL
133133
- git fetch origin $PAGES_BRANCH && git -b checkout $PAGES_BRANCH origin/$PAGES_BRANCH || git checkout $PAGES_BRANCH || echo "Pages branch not deployed yet."
134134
- git checkout $CI_COMMIT_SHA
135-
- DOCS_TAG=${CI_COMMIT_TAG:=$CI_COMMIT_BRANCH}
135+
- DOCS_TAG_RAW=${CI_COMMIT_TAG:=$CI_COMMIT_BRANCH} # get tag (or if not present, current branch)
136+
- DOCS_TAG=${DOCS_TAG_RAW//\//_} # eliminate '/' symbols from branch (or tag) name
136137
- echo Deploying docs for "$DOCS_TAG"
137138
- mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $DOCS_TAG latest
138139
- mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest

0 commit comments

Comments
 (0)