File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -27,23 +27,15 @@ jobs:
2727
2828 - name : SSH to VM and deploy
2929 run : |
30- ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_IP }} "
31- echo "Entering project directory..."
30+ ssh -o "StrictHostKeyChecking no" ${{ secrets.EC2_USER }}@${{ secrets.EC2_IP }} "
3231 cd ${{ secrets.PROJECT_PATH }}/frontend
33- echo "Pulling latest from origin/main..."
3432 git fetch origin main
3533 git reset --hard origin/main
36- echo "Stopping frontend service (if running)..."
3734 docker compose stop frontend
38- echo "Removing old container (if exists)..."
3935 docker compose rm -f frontend
40- echo "Building the frontend container..."
4136 docker compose build frontend
42- echo "Starting the frontend container in headless mode..."
4337 docker compose up -d --no-deps --force-recreate frontend
44- echo "Cleaning up unused images and containers..."
4538 docker image prune -af
4639 docker container prune -f
4740 docker system prune -f
48- echo "Deployment finished successfully.
4941 "
You can’t perform that action at this time.
0 commit comments