1
0
Fork 0

drone: deploy docs

deb_package
Sebastian Heimann 4 years ago
parent 382e8d9434
commit d1933d25ac

@ -21,6 +21,7 @@ steps:
pull: never
commands:
- python3 setup.py install && cd doc && make html
- python3 -m pyrocko.print_version short > build/html/version.txt
- name: stage
image: pyrocko-aux
@ -35,6 +36,44 @@ steps:
RSYNC_KEY:
from_secret: rsync-key
- name: stage-www
image: pyrocko-aux
pull: never
when:
branch:
- release
- deploy-docs
commands:
- maintenance/drone-rsync.sh doc/build/html/ ${DRONE_COMMIT}/docs/
environment:
RSYNC_HOST:
from_secret: www-host
RSYNC_USER:
from_secret: www-user
RSYNC_KEY:
from_secret: rsync-key
- name: deploy-www
image: pyrocko-aux
pull: never
when:
branch:
- release
- deploy-docs
commands:
- maintenance/drone-deploy-docs.sh
environment:
WWW_HOST:
from_secret: www-host
WWW_USER:
from_secret: www-user
WWW_KEY:
from_secret: www-key
---
kind: pipeline

@ -0,0 +1,17 @@
#!/bin/bash
set -e
[ ! -z "$DRONE" ] || exit 1
keypath=/tmp/deploy-www-key-$$
umask 0077
echo "$WWW_KEY" > $keypath
umask 0022
ssh -o StrictHostKeyChecking=no -i $keypath "${WWW_USER}@${WWW_HOST}" "${DRONE_COMMIT}"
rm $keypath

@ -15,5 +15,7 @@ if __name__ == '__main__':
print('PyQt: %s' % Qt.PYQT_VERSION_STR)
print('Qt: %s' % Qt.QT_VERSION_STR)
print('python: %s.%s.%s' % sys.version_info[:3])
elif sys.argv[1:] == ['short']:
print(pyrocko.version)
else:
print(pyrocko.long_version)

Loading…
Cancel
Save