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" .