Skip to content
Snippets Groups Projects
Verified Commit 9133dfb7 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

change the deploy model to latest and stable

parent d3f667c1
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,33 @@ test:
pages:
stage: deploy
only:
- develop
- master
script:
- bundle exec jekyll build -d public
# build the master version into stable
- git fetch --tags
- latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
- git checkout $latestTag
- bundle exec jekyll build -d public
- mkdir stable
- mv public/* stable/.
# build the develop version into latest
- git checkout -f develop
- git fetch origin develop
- git reset --hard origin/develop
- bundle exec jekyll build -d public
- mkdir latest
- mv public/* latest/.
# deploy the stable and latest directories
- mv stable public/.
- mv latest public/.
# auto redirect file
- cp .autoRedirect public/index.html
artifacts:
paths:
- public
only:
- master
- public
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment