Commit 0487463f authored by Peter Serwylo's avatar Peter Serwylo

Only deploy GP repo to surge.sh

When deploying feature branches to surge.sh, don't try to deploy the
entire f-droid.org repo of apps. This results in about 80MiB for each
language we translate the website into, and quickly goes above the
100MiB limit on surge.sh.

This still gets deployed to GitLab pages if you push to master, and it
also builds the entire f-droid.org repo during the test stage to make
sure there are no bugs with it.
parent ad4c3071
......@@ -74,9 +74,12 @@ build:
# Ideally we would use GitLab pages for this, but until they suupport deploying feature
# branches alongside master branches (https://gitlab.com/gitlab-org/gitlab-pages/issues/33)
# this is the next best option.
#
# Note that although we are building the entire F-Droid repo in the `build` stage, this `preview`
# stage only builds the GP repo. This is because i18n versions of f-droid.org increase the size
# well beyond the 100MiB limit of surge.sh.
preview:
stage: deploy
image: node:wheezy
except: [ master ]
# This is allowed to fail because only those who have setup $SURGE_LOGIN and $SURGE_TOKEN
......@@ -84,7 +87,15 @@ preview:
allow_failure: true
script:
- *setup_for_jekyll
- 'echo "url: https://$STAGING_URL" > userconfig.yml'
- 'echo baseurl: /$CI_PROJECT_NAME >> userconfig.yml'
- 'echo fdroid-repo: https://guardianproject.info/fdroid/repo >> userconfig.yml'
- 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
- apt-get install -y npm
- npm install -g surge
- update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
- surge --project $OUT_DIR --domain $STAGING_URL
environment:
......
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