Newer
Older
image: python:3.8-buster
build:
stage: build
before_script:
- apt-get -y update && apt-get -y install make pelican
script:
- make publish
artifacts:
paths:
- output/
deploy_naturalnet:
stage: deploy
only:
- master
before_script:
- apt-get -y update && apt-get -y install rsync openssh-client
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - >/dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- 'rsync -avzh --delete output/* $SSH_USERNAME@$SSH_HOST:'