diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b3513c7..3e44f3d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -34,26 +34,6 @@ jobs: ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && git pull origin main" echo "🚀 The main branch has been pulled on the VPS." - - name: Building the Docker services - env: - VPS_USER: ${{ secrets.VPS_USER }} - VPS_HOST: ${{ secrets.VPS_HOST }} - VPS_PATH: ${{ secrets.VPS_PATH }} - VPS_PORT: ${{ secrets.VPS_PORT }} - run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose build" - echo "📦 The services have been builded on the VPS." - - - name: Installing the dependencies - env: - VPS_USER: ${{ secrets.VPS_USER }} - VPS_HOST: ${{ secrets.VPS_HOST }} - VPS_PATH: ${{ secrets.VPS_PATH }} - VPS_PORT: ${{ secrets.VPS_PORT }} - run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev install" - echo "📦 The dependencies has been installed." - - name: Building the application env: VPS_USER: ${{ secrets.VPS_USER }} @@ -61,19 +41,9 @@ jobs: VPS_PATH: ${{ secrets.VPS_PATH }} VPS_PORT: ${{ secrets.VPS_PORT }} run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev build" + ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose-prod.yml build --no-cache" echo "📦 The application have been builded on the VPS." - - name: Stop the application - env: - VPS_USER: ${{ secrets.VPS_USER }} - VPS_HOST: ${{ secrets.VPS_HOST }} - VPS_PATH: ${{ secrets.VPS_PATH }} - VPS_PORT: ${{ secrets.VPS_PORT }} - run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose down" - echo "🚀 The application has been started on the VPS." - - name: Start the application env: VPS_USER: ${{ secrets.VPS_USER }}