This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/.gitlab-ci.yml

24 lines
563 B
YAML
Raw Normal View History

2020-12-26 16:49:47 +01:00
stages:
- build
- test
- publish
- deploy
2020-12-26 18:05:50 +01:00
deploy:
stage: deploy
image: ubuntu
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y --no-install-recommends )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
2020-12-26 18:09:43 +01:00
- touch ~/.ssh/config
- chmod 644 ~/.ssh/config
- echo "$SSH_CONFIG" > ~/.ssh/config
2020-12-26 18:05:50 +01:00
script:
- ssh blog -o StrictHostKeyChecking=no "/home/gaugendre/blog/update"
only:
- master