Added user feature to upload.sh
parent
29a6924e01
commit
51a524ffa4
|
@ -3,20 +3,18 @@ image: python:3.5
|
|||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
#~ - deploy
|
||||
# - review
|
||||
|
||||
|
||||
before_script:
|
||||
#~ - apt-get update && apt-get -y install gcc libmagickwand-dev make
|
||||
- apt-get update && apt-get -y install git-lfs
|
||||
- git lfs install
|
||||
- pip3 install -U pip setuptools wheel
|
||||
- pip3 install -r requirements.txt
|
||||
- python3 setup.py build_ext -i #Need the C++ extension only.
|
||||
- mkdir testpath
|
||||
|
||||
after_script:
|
||||
- rm -rf dist build docs/build openlut.egg-info
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
|
@ -39,15 +37,16 @@ build_docs:
|
|||
test:
|
||||
stage: test
|
||||
script:
|
||||
- git lfs pull
|
||||
- python3 tests/suite.py
|
||||
|
||||
deploy_docs:
|
||||
stage: deploy
|
||||
environment:
|
||||
name: Documentation
|
||||
url: https://www.sofusrose.com/openlut
|
||||
script:
|
||||
- docs/upload.sh
|
||||
#~ deploy_docs:
|
||||
#~ stage: deploy
|
||||
#~ environment:
|
||||
#~ name: Documentation
|
||||
#~ url: https://www.sofusrose.com/openlut
|
||||
#~ script:
|
||||
#~ - docs/upload.sh
|
||||
#~ when: manual
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
REMOTE=sofus@wakingnexus
|
||||
USER="$1"
|
||||
if [ -z $USER ]; then USER="sofus"; fi
|
||||
|
||||
REMOTE="${USER}@wakingnexus"
|
||||
|
||||
#Remove the old docs.
|
||||
ssh $REMOTE 'bash -s' << 'ENDSSH'
|
||||
|
@ -15,7 +18,7 @@ rsync -avzP build/html/* $REMOTE:/var/www/openlut/
|
|||
#Set strong permissions.
|
||||
ssh $REMOTE 'bash -s' << 'ENDSSH'
|
||||
|
||||
chown -R sofus:www-data /var/www/openlut/*
|
||||
chown -R $USER:www-data /var/www/openlut/*
|
||||
find /var/www/openlut -type f -exec chmod 0640 {} \;
|
||||
find /var/www/openlut -type d -exec chmod 2750 {} \;
|
||||
|
||||
|
|
Loading…
Reference in New Issue