image: digitallyseamless/nodejs-bower-grunt pages: 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