diff --git a/.deploy.sh b/.deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..80b51ca544d4f714d734e37f72140e0919d3a37f --- /dev/null +++ b/.deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +cd $DIR + +git fetch origin > /dev/null 2>> deploy.log +git reset --hard origin/master > /dev/null 2>> deploy.log + +bower install --allow-root > /dev/null 2>> deploy.log + +curl --request POST 'https://push.dbogatov.org/api/push/deploy' --data "project=Inara-CV" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..776915c65ffa09a06a1570a3c64789d9b93e2e69 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,6 @@ +production: + type: deploy + script: + - curl --request POST 'https://deploy.dbogatov.org/deploy' --data "token=$TOKEN" --data "project=Inara-CV" + only: + - master \ No newline at end of file