Commit 5c4f12d1 authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻
Browse files

automatically push docs to cryptops.com

parent 890ca070
Pipeline #3259 failed with stage
stages:
- build
- deploy
image: pstauffer/python3:latest
variables:
FTP_USER: 'webmaster_unlog_nl'
DOMAIN_NAME: 'cryptops.com'
build:
stage: build
script:
# Install sphinx
- pip install sphinx
# Build the website
- cd docs && make html
artifacts:
paths:
- docs/_build/html
expire_in: 1 week
deploy-master:
stage: deploy
environment:
name: master
url: $DOMAIN_NAME
only:
- '/^master$/'
variables:
SUBDOMAIN: 'DEFAULT'
script:
- ./deploy.sh
#!/bin/bash
# Run ssh-agent and add ssh key.
eval $(ssh-agent -s)
ssh-add <(echo "$SSH_KEY")
# Add server's ssh host key to known hosts.
mkdir -p ~/.ssh
[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
# Install rsync.
# apt-get update
# apt-get install -y rsync
# Upload site.
rsync -r --verbose --compress --delete ./docs/_build/html/* \
"${FTP_USER}@ftp.greenhost.nl:${DOMAIN_NAME}/${SUBDOMAIN}"
Supports Markdown
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