From e9ce211c1611b9829268589844cac2c1c4dbfbcc Mon Sep 17 00:00:00 2001 From: qinluhe Date: Thu, 4 Jul 2024 12:00:22 +0800 Subject: [PATCH] chore: update deploy.sh --- .github/workflows/deploy_web.yaml | 2 +- frontend/appflowy_web_app/deploy/deploy.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_web.yaml b/.github/workflows/deploy_web.yaml index 7592015218..09900a950a 100644 --- a/.github/workflows/deploy_web.yaml +++ b/.github/workflows/deploy_web.yaml @@ -70,7 +70,7 @@ jobs: - name: Archive build output working-directory: frontend/appflowy_web_app run: | - tar -czf build-output.tar.gz dist deploy/server.cjs deploy/start.sh deploy/Dockerfile deploy/nginx.conf .env deploy/supervisord.conf + tar -czf build-output.tar.gz dist deploy .env - name: Deploy to EC2 (Test) if: github.event.inputs.environment == 'test' diff --git a/frontend/appflowy_web_app/deploy/deploy.sh b/frontend/appflowy_web_app/deploy/deploy.sh index 18a66c10db..772862c246 100644 --- a/frontend/appflowy_web_app/deploy/deploy.sh +++ b/frontend/appflowy_web_app/deploy/deploy.sh @@ -7,12 +7,18 @@ PORT=$1 echo "Starting deployment on port $PORT" -rm -rf dist +rm -rf deploy tar -xzf build-output.tar.gz rm -rf build-output.tar.gz +mv dist deploy/dist + +mv .env deploy/.env + +cd deploy + docker system prune -f docker build -t appflowy-web-app-"$PORT" .