Commit 20c25f1f by Peter Serwylo

Formatting of CI file to make more concise

parent 93e9e361
......@@ -34,14 +34,10 @@ variables:
# static site ready to be deployed to https://f-droid.org.
#
f-droid.org:
stage: deploy
when: manual
cache:
paths:
- vendor/ruby
paths: [ vendor/ruby ]
script:
- '[ ! -d "$DEPLOY_DIR" ] && echo "DEPLOY_DIR env variable must point to a directory" && exit 1'
......@@ -53,15 +49,12 @@ f-droid.org:
- cp -r $OUT_DIR $DEPLOY_DIR/
build:
stage: test
except:
- master
except: [ master ]
cache:
paths:
- vendor/ruby
paths: [ vendor/ruby ]
artifacts:
paths: [ $OUT_DIR ]
script:
- *setup_for_jekyll
......@@ -70,10 +63,6 @@ build:
- echo "Additional Jekyll config used for CI:" && cat userconfig.yml
- bundle exec jekyll build -d $OUT_DIR/$CI_PROJECT_NAME --config _config.yml,userconfig.yml --verbose --trace
artifacts:
paths:
- $OUT_DIR
# This deploys feature branches to https://surge.sh, a free static site hosting service.
# See CONTRIBUTING.md for details of how to configure your GitLab project to enable this.
......@@ -81,18 +70,14 @@ build:
# branches alongside master branches (https://gitlab.com/gitlab-org/gitlab-pages/issues/33)
# this is the next best option.
preview:
stage: deploy
except:
- master
image: node:wheezy
except: [ master ]
# This is allowed to fail because only those who have setup $SURGE_LOGIN and $SURGE_TOKEN
# as GitLab secret variables (see CONTRIBUTING.md) are able to preview like this.
allow_failure: true
image: node:wheezy
script:
- npm install -g surge
- surge --project $OUT_DIR --domain $STAGING_URL
......@@ -105,23 +90,17 @@ preview:
teardown_preview:
stage: deploy
except:
- master
image: node:wheezy
except: [ master ]
when: manual
variables:
GIT_STRATEGY: none
when: manual
# This is allowed to fail because only those who have setup $SURGE_LOGIN and $SURGE_TOKEN
# as GitLab secret variables (see CONTRIBUTING.md) are able to preview like this.
allow_failure: true
image: node:wheezy
script:
- npm install -g surge
- surge teardown $STAGING_URL
......@@ -132,15 +111,12 @@ teardown_preview:
pages:
stage: deploy
only:
- master
only: [ master ]
cache:
paths:
- vendor/ruby
paths: [ vendor/ruby ]
artifacts:
paths: [ public ]
script:
- *setup_for_jekyll
......@@ -149,10 +125,6 @@ pages:
# so we need to make sure that the Jekyll configuration understands this.
- 'echo url: https://$CI_PROJECT_NAMESPACE.gitlab.io > userconfig.yml'
- 'echo baseurl: /$CI_PROJECT_NAME >> userconfig.yml'
- echo "Additional Jekyll config used for CI:" && cat userconfig.yml
- echo "Additional Jekyll config used for CI:" && cat userconfig.yml
- bundle exec jekyll build -d public --config _config.yml,userconfig.yml
artifacts:
paths:
- public
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment