diff --git a/bin/build-frontend b/bin/build-frontend new file mode 100755 index 0000000..bc50c4a --- /dev/null +++ b/bin/build-frontend @@ -0,0 +1,5 @@ +#!/bin/bash +set -eu +cd frontend +npm i +npm run build diff --git a/bin/deploy b/bin/deploy index 4edaa2b..ba7568a 100755 --- a/bin/deploy +++ b/bin/deploy @@ -6,10 +6,15 @@ PROCESS_NAME="bbs.neuf.no" echo "Deploying bbs to ${PROJECT_PATH}" cd "$PROJECT_PATH" || exit 1 git pull + +# Backend poetry install umask 022; poetry run python manage.py collectstatic --noinput # Collect static poetry run python manage.py migrate # Run DB migrations -# Reload +# Frontend +bin/build-frontend + +# Reload backend echo "Reloading supervisor process ${PROCESS_NAME}" sudo /usr/bin/supervisorctl pid "$PROCESS_NAME" | xargs kill -HUP diff --git a/bin/run-frontend b/bin/run-frontend index 1ea819e..959292f 100755 --- a/bin/run-frontend +++ b/bin/run-frontend @@ -1 +1,4 @@ +#!/bin/bash + cd frontend && npm run start +