diff options
Diffstat (limited to 'deploy/deploy.sh')
-rwxr-xr-x | deploy/deploy.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 9773a9f..4650ccf 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -13,6 +13,7 @@ DEV_DIR="$(realpath "$DIR/../")" STAGING_DIR="$HOME/staging" PROD_DIR="$HOME/prod" PHP=/usr/bin/php8.1 +REPO_URI=$(cat "$DEV_DIR/config.yaml" | grep ^git_repo | head -1 | awk '{print $2}') git push origin master @@ -21,7 +22,7 @@ pushd "$STAGING_DIR" if [ ! -d .git ]; then git init - git remote add origin git@ch1p.io:ch1p_io_web.git + git remote add origin "$REPO_URI" git fetch git checkout master fi @@ -35,8 +36,7 @@ if [ ! -d node_modules ]; then npm i fi -cp "$DEV_DIR/config-local.php" . -sed -i '/is_dev/d' ./config-local.php +cp "$DEV_DIR/config.yaml" . "$DIR"/build_js.sh -i "$DEV_DIR/htdocs/js" -o "$STAGING_DIR/htdocs/dist-js" || die "build_js failed" "$DIR"/build_css.sh -i "$DEV_DIR/htdocs/scss" -o "$STAGING_DIR/htdocs/dist-css" || die "build_css failed" @@ -48,6 +48,7 @@ popd rsync -a --delete --delete-excluded --info=progress2 "$STAGING_DIR/" "$PROD_DIR/" \ --exclude .git \ --exclude debug.log \ + --exclude='/log' \ --exclude='/composer.*' \ --exclude='/htdocs/scss' \ --exclude='/htdocs/js' \ |