diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd5ec997e5b5ae085add7c2e6b0addbe3a0caf9c..fc5b65cbec45d03000e06ed7ff3fc3ba1d7e05d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,7 @@ variables: stages: - test + - apidoc - deploy before_script: @@ -43,13 +44,26 @@ test: - elasticsearch - redis -#deploy: -# stage: deploy -# script: -# - mina deploy -# only: -# - master -# tags: +doc: + stage: apidoc + script: + - bundle exec rake db:migrate:reset RAILS_ENV=test + - bundle exec rake docs:generate + - ./docploy.sh + only: + - stable + tags: + - ruby + - postgres + - elasticsearch + - redis +# deploy: +# stage: deploy +# script: +# # - mina deploy +# only: +# - master +# tags: # - ruby # - postgres # - elasticsearch diff --git a/docploy.sh b/docploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..e07bd6bf022cfc9e6398a545ddf208ba1fa3220a --- /dev/null +++ b/docploy.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Copyright (C) 2015 Centro de Computacao Cientifica e Software Livre +# Departamento de Informatica - Universidade Federal do Parana +# +# This file is part of portalmec. +# +# portalmec is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# portalmec is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with portalmec. If not, see <http://www.gnu.org/licenses/>. + + +eval "$(ssh-agent -s)" +ssh-add <(echo "$SSH_KEY_PROD") + + +scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r /builds/portalmec/portalmec/doc/ $SSH_HOST_PROD:/home/portalmec/ \ No newline at end of file