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

remove old deployment section

parent 3a5a7c1c
No related branches found
No related tags found
No related merge requests found
...@@ -3,66 +3,13 @@ image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.6 ...@@ -3,66 +3,13 @@ image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.6
stages: stages:
- build - build
- generate_index - generate
- deploy - deploy
# !!!!!!! README !!!!! # build
# We are in the transition period - and the website is deployed two times - to gitlab pages and to a separate VM # ------------------------------------------------------------------------------------
# In order to migrate to a new deployment:
# 1) remove "Old deployment" section - build_pages, generate the search index and pages tasks
# 2) rename "new pages" to "pages" in the new deployment section, and "new_public" to "public"; you might also rename directories (skip "new" part)
# 3) remove ".ci/deploy.sh", ".ci/build_indices.sh"
build:pages:
# Old deployment =================================================================
build_pages:
stage: build
before_script:
- apt-get -qq update
- apt-get install -y -qq git-lfs
- gem install bundler:2.0.2 && bundle install
script:
- bash .ci/deploy.sh
variables:
JEKYLL_ENV: production
artifacts:
expire_in: 1 day
paths:
- build
generate the search index:
stage: generate_index
image: node:13.8.0-slim
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "develop"
script:
- bash .ci/build_indices.sh
- mv build processed_build
artifacts:
expire_in: 1 day
paths:
- processed_build
pages:
image: alpine:3.11.3
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "develop"
script:
- mv processed_build public
artifacts:
expire_in: 1 week
paths:
- public
# New deployment ==================================================================
build pages for VM deployment:
stage: build stage: build
variables: variables:
JEKYLL_ENV: production JEKYLL_ENV: production
...@@ -92,9 +39,11 @@ build pages for VM deployment: ...@@ -92,9 +39,11 @@ build pages for VM deployment:
# Run Jekyll with custom configuration # Run Jekyll with custom configuration
- bundle exec jekyll build -d new_build --config "_config.yml,.ci/_config_$CI_COMMIT_REF_NAME.yml" - bundle exec jekyll build -d new_build --config "_config.yml,.ci/_config_$CI_COMMIT_REF_NAME.yml"
# generate
# ------------------------------------------------------------------------------------
generate the search index for VM deployment: generate:searchIndex:
stage: generate_index stage: generate
image: node:13.8.0-slim image: node:13.8.0-slim
variables: variables:
LUNR_VERSION: 2.3.8 LUNR_VERSION: 2.3.8
...@@ -110,8 +59,11 @@ generate the search index for VM deployment: ...@@ -110,8 +59,11 @@ generate the search index for VM deployment:
paths: paths:
- new_processed_build - new_processed_build
# Deploy to Gitlab Pages - to be run only by forks; change to pages once it's ready # deploy
new pages: # ------------------------------------------------------------------------------------
# Deploy to Gitlab Pages - to be run only by forks
pages:
image: alpine:3.11.3 image: alpine:3.11.3
stage: deploy stage: deploy
rules: rules:
...@@ -125,7 +77,7 @@ new pages: ...@@ -125,7 +77,7 @@ new pages:
- new_public - new_public
## Deploys the website to a separate VM ## Deploys the website to a separate VM
deploy to production: deploy:vm:
stage: deploy stage: deploy
image: alpine:3.1 image: alpine:3.1
before_script: before_script:
......
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