diff --git a/.github/workflows/CI_Proveedores-QA.yml b/.github/workflows/CI_Proveedores-QA.yml index 54af61e..d6ee9e0 100644 --- a/.github/workflows/CI_Proveedores-QA.yml +++ b/.github/workflows/CI_Proveedores-QA.yml @@ -41,5 +41,18 @@ jobs: # ssh -i ${{ secrets.PEM_PROV_QA }} ec2-user@${{ secrets.IP_PROV_QA }} 'docker pull 471626/imagen-prov-qa && docker run -d -p 3000:3000 471626/imagen-prov-qa' - name: Verify Service is Running - run: | - ssh -i ${{ secrets.PEM_PROV_QA }} ec2-user@${{ secrets.IP_PROV_QA }} 'docker ps -a' + uses: appleboy/ssh-action@master + with: + host: ${{ env.REMOTE_HOST }} + username: ${{ env.REMOTE_USER }} + key: ${{ env.SSH_PRIVATE_KEY }} + script: | + cd /opt/compras + if curl http://localhost:3001 > /dev/null; then + echo "App ok" + else + echo "Error" + exit 1 + fi + # run: | + # ssh -i ${{ secrets.PEM_PROV_QA }} ec2-user@${{ secrets.IP_PROV_QA }} 'docker ps -a'