Forked from
Verified Software / psvg.doc.ic.ac.uk
893 commits behind the upstream repository.
-
Thomas Wood authoredThomas Wood authored
.gitlab-ci.yml 1.15 KiB
stages:
- update
- test
- deploy
update_publications:
stage: update
script:
- git checkout -B ${CI_BUILD_REF_NAME}
- git submodule update --init --remote
- git add publications
- git commit -m "[AUTO] Updating publications submodule" --author="Resource Reasoning Group Backup Bot <rr-gitlab-bot@example.com>" || exit 0
- git remote rm rw || true
- git remote add rw git@gitlab.doc.ic.ac.uk:${CI_PROJECT_PATH}.git
- eval `ssh-agent`
- echo "$PUSH_KEY" | ssh-add -
- git push rw ${CI_BUILD_REF_NAME}
- ssh-agent -k
only:
- triggers
.before_script: &before_script
- bundle install --without=development
- bundle exec rake init
test:
stage: test
before_script: *before_script
script:
- bundle exec rake test
except:
- triggers
deploy:
stage: deploy
environment: production
before_script: *before_script
script:
- bundle exec rake deploy
tags:
- doc
only:
- master
except:
- triggers
# Not a test stage to prevent race conditions with gem installations.
deadlinks:
stage: deploy
script:
- bundle exec rake testlinks
allow_failure: true
except:
- triggers