diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a79a7653..a82a9992 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -39,9 +39,6 @@ jobs: # docker push registry.infra.mintel.me/mintel/klz-cables.com:latest - name: Deploy to production server - env: - REGISTRY_USER: ${{ secrets.REGISTRY_USER }} - REGISTRY_PASS: ${{ secrets.REGISTRY_PASS }} run: | mkdir -p ~/.ssh echo "${{ secrets.ALPHA_SSH_KEY }}" > ~/.ssh/id_ed25519 @@ -49,11 +46,11 @@ jobs: ssh-keyscan -H alpha.mintel.me >> ~/.ssh/known_hosts 2>/dev/null - ssh -o StrictHostKeyChecking=accept-new deploy@alpha.mintel.me bash -c "' + ssh -o StrictHostKeyChecking=accept-new deploy@alpha.mintel.me "bash -s" << 'ENDSSH' set -e - echo \"$REGISTRY_PASS\" | docker login registry.infra.mintel.me -u \"$REGISTRY_USER\" --password-stdin + echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin cd /home/deploy/sites/klz-cables.com docker compose pull docker compose up -d --force-recreate --remove-orphans docker image prune -f - '" \ No newline at end of file + ENDSSH \ No newline at end of file