Commit d447bd77 authored by Floriana's avatar Floriana

updated CI script

parent 8d20ef71
Pipeline #91228634 passed with stages
image: ruby:2.3
job1:
before_script:
- export LC_ALL="C.UTF-8"
- export LANG="en_US.UTF-8"
- export LANGUAGE="en_US.UTF-8"
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
pages:
# before_script:
# - export LC_ALL="C.UTF-8"
# - export LANG="en_US.UTF-8"
# - export LANGUAGE="en_US.UTF-8"
# - eval $(ssh-agent -s)
# - ssh-add <(echo "$SSH_PRIVATE_KEY")
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# next command is suggested here: https://stackoverflow.com/questions/25689231/getting-gitlab-ci-to-clone-private-repositories
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
stage: deploy
# - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# stage: deploy
script:
- gem install bundler
- bundle install
- bundle exec jekyll build -d public
- scp -r public/* git@guides.accessnow.org:/home/git/helplinedocs
artifacts:
paths:
- public
only:
- master
job2:
before_script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
stage: deploy
script:
- mkdir temp/
- ./select.sh
- git clone git@gitlab.com:AccessNowHelpline/community-documentation.git
- cd community-documentation
- git config --local user.email "docs@accessnow.org"
- git config --local user.name "Access Now Helpline"
- git checkout drafts
- cp ../temp/* pages/mydoc/
- git add pages/mydoc/*
- if [ $(git status --porcelain | wc -l) -ne 0 ]; then git commit -a -m "automatic push from confidential repository" && git push; fi
only:
- master
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