Skip to content
Snippets Groups Projects
Commit 00ed6c9b authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

new strategy to deploy

parent 9744ab17
No related branches found
No related tags found
1 merge request!29Regular merge of develop
Pipeline #8420 passed
image: digitallyseamless/nodejs-bower-grunt
pages:
stage: build
only:
- develop
script:
- npm install -g npm@latest yo grunt-cli generator-reveal bower
- npm install
- grunt dist
- mkdir latest
- mv public/* latest/.
- mv latest public/.
- cp .autoRedirect public/index.html
artifacts:
paths:
- public/latest
stage: deploy
only:
- develop
- master
script:
# install npm
- npm install -g npm@latest yo grunt-cli generator-reveal bower
- npm install
# build the master version into stable
- git checkout master
- git pull origin master
- grunt dist
- mkdir stable
- mv public/* stable/.
# build the develop version into latest
- git checkout develop
- git pull origin develop
- grunt dist
- 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/stable
- public
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