diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 06:11:00 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 20:45:40 +0300 |
commit | c0dc531ebefd8912819f3b6c8bda1fed3c7e750c (patch) | |
tree | 2c75aa9df182260aef09faf4befd81a4c2b9c5e2 /deploy | |
parent | 48d688cdf7f9eae1bf11b8a6f0e5b98687c604cb (diff) |
make it simple, but not simpler
Diffstat (limited to 'deploy')
-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' \ |