Commit 1bc881ea authored by Isabella Skořepová's avatar Isabella Skořepová

Added basic .gitlab-ci.yml

parent c7e31dab
Pipeline #120 failed with stage
before_script:
- node --version
- ./configure.sh
upload:
script:
- ./upload
# Needs following env var: LFTP_PASSWORD
......@@ -7,19 +7,32 @@ fi
rm -rf build
mkdir -p build/theme
node index.js --noserver
time node index.js --noserver
echo "Site compiled"
chmod a+X build -R
USER=ok1kvk.cz-www-nove
HOST=ok1kvk.cz
HOST=krios.blueboard.cz
MAX_RETRIES=2
RECONNECT_INTERVAL=5
echo "======================================================================"
echo "Uploading to nove.ok1kvk.cz"
if [ $1 == "ftp" ]; then
if [ "$1" == "ftp" ]; then
echo "Using FTP"
lftp -c "set ftp:ssl-allow no;open --user ok1kvk.cz-www-nove --env-password ftp://ftp.ok1kvk.cz/; mirror -c --verbose=9 -e -R -L ./build /"
time lftp -c "set cmd:fail-exit yes;\
set net:timeout 5;\
set net:reconnect-interval-base $RECONNECT_INTERVAL;\
set net:max-retries $MAX_RETRIES;\
set ftp:ssl-allow no;\
open --user $USER --env-password ftp://$HOST/;\
mirror -c --verbose=9 -e -R -L ./build /"
else
echo "Using SFTP"
lftp -c "set ftp:ssl-allow no;open --user ok1kvk.cz-www-nove --env-password -p 2121 sftp://ftp.ok1kvk.cz/; mirror -c --verbose=9 -e -R -L ./build /"
time lftp -c "set cmd:fail-exit yes;\
set net:timeout 5;\
set net:reconnect-interval-base $RECONNECT_INTERVAL;\
set net:max-retries $MAX_RETRIES;\
open --user $USER --env-password -p 2121 sftp://$HOST/;\
mirror -c --verbose=9 -e -R -L ./build /"
fi
Markdown is supported
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