File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,13 +28,12 @@ jobs:
2828 run : git config --global --add safe.directory $GITHUB_WORKSPACE
2929
3030 - name : Build gh-pages
31- env : |
32- SOURCEDIR = ./
33- BUILDDIR = $(SOURCEDIR)/docs
34- GH_PAGES_DIR_NAME = gh-pages
35- BRANCH_DIR_NAME = $(subst /,_,$(BRANCH_NAME))
36- DOCS = "$(GH_PAGES_DIR_NAME)/$(BRANCH_DIR_NAME)"
31+ env :
32+ BUILDDIR : docs
33+ GH_PAGES_DIR_NAME : gh-pages
3734 run : |
35+ safe_branch=$(echo "${GITHUB_REF_NAME}" | tr '/' '-')
36+ DOCS=$(GH_PAGES_DIR_NAME)/$(safe_branch)
3837 rm -rf "$(GH_PAGES_DIR_NAME)"
3938 git clone `git config --get remote.origin.url` --branch gh-pages --depth 1 gh-pages
4039 install -d $(BUILDDIR)
5352 git -C $(GH_PAGES_DIR_NAME) add content.html
5453 git -C $(GH_PAGES_DIR_NAME) add navtree.css
5554 git -C $(GH_PAGES_DIR_NAME) add main.css
56- git -C $(GH_PAGES_DIR_NAME) add "$(BRANCH_DIR_NAME )/*"
55+ git -C $(GH_PAGES_DIR_NAME) add "$(safe_branch )/*"
5756 -git -C $(GH_PAGES_DIR_NAME) commit -m 'Automatic update of GH pages'
5857 # The pipeline has to lock the execution of this script, so no updates of the branch are done since clone.
5958 git -C $(GH_PAGES_DIR_NAME) push
You can’t perform that action at this time.
0 commit comments