Skip to content

Commit

Permalink
updating the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
asleepace committed Jan 15, 2025
1 parent 495cbb3 commit 09d55ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
22 changes: 12 additions & 10 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@ set -e
# pretty print function for output
pretty_print() {
local text="$1"
echo -e "\n\n${MAGENTA} • deploy ${RESET} - ${WHITE}${text}${RESET}\n\n"
echo -e "\n${MAGENTA} • deploy ${RESET} - ${WHITE}${text}${RESET}\n"
}

pretty_print "fetching latest changes from git..."
# print some memory stats
pretty_print "[memory] $(free -h)"
pretty_print "[disk] $(df -h)"

pretty_print "[1/5] fetching latest changes from git..."

git fetch origin
git checkout main
git pull

pretty_print "installing ASDF plugins..."
pretty_print "[2/5] installing ASDF plugins..."

asdf install

pretty_print "installing node modules..."
pretty_print "[3/5] installing node modules..."

bun run install

pretty_print "building application..."
pretty_print "[4/5] building application..."

bun run build:tailwind
bun run build

pretty_print "building backend application"

pretty_print "restarting server..."
pretty_print "[5/5] restarting server..."

pm2 restart "asleepace.com"
pm2 restart "asleepace-backend"

pretty_print "success!"
pretty_print "[ ✅ ] success!"
6 changes: 6 additions & 0 deletions services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ pm2 stop $service_name
pm2 restart $service_name
pm2 status $service_name
pm2 logs $service_name

# common memory commands
free -h
df -h
ncdu /
ps aux
```

## [Nginx](./nginx/ABOUT.md)
Expand Down

0 comments on commit 09d55ae

Please sign in to comment.