chore: update deploy.sh

This commit is contained in:
qinluhe 2024-07-04 12:00:22 +08:00
parent 59bbc43fc4
commit e9ce211c16
2 changed files with 8 additions and 2 deletions

View File

@ -70,7 +70,7 @@ jobs:
- name: Archive build output - name: Archive build output
working-directory: frontend/appflowy_web_app working-directory: frontend/appflowy_web_app
run: | 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) - name: Deploy to EC2 (Test)
if: github.event.inputs.environment == 'test' if: github.event.inputs.environment == 'test'

View File

@ -7,12 +7,18 @@ PORT=$1
echo "Starting deployment on port $PORT" echo "Starting deployment on port $PORT"
rm -rf dist rm -rf deploy
tar -xzf build-output.tar.gz tar -xzf build-output.tar.gz
rm -rf 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 system prune -f
docker build -t appflowy-web-app-"$PORT" . docker build -t appflowy-web-app-"$PORT" .