Merge pull request 'Added preprod stop' (#11) from add-cleanup-preprod-job into main
Remote Deployment Pipeline / Prepare Context (push) Successful in 5s
Remote Deployment Pipeline / Deploy (Dev/Preview) (push) Skipped
Remote Deployment Pipeline / Cleanup Preview (push) Skipped
Remote Deployment Pipeline / Deploy (Pre-Prod) (push) Successful in 1m7s
Remote Deployment Pipeline / Stop Pre-Prod (push) Successful in 25s
Remote Deployment Pipeline / Prepare Context (push) Successful in 5s
Remote Deployment Pipeline / Deploy (Dev/Preview) (push) Skipped
Remote Deployment Pipeline / Cleanup Preview (push) Skipped
Remote Deployment Pipeline / Deploy (Pre-Prod) (push) Successful in 1m7s
Remote Deployment Pipeline / Stop Pre-Prod (push) Successful in 25s
Reviewed-on: #11
This commit was merged in pull request #11.
This commit is contained in:
@@ -92,6 +92,22 @@ jobs:
|
||||
set -e
|
||||
cd ${{ env.REMOTE_PREPROD_PATH }}
|
||||
docker compose -f docker-compose.yml up -d --build --remove-orphans --wait
|
||||
stop_preprod:
|
||||
name: Stop Pre-Prod
|
||||
runs-on: ubuntu-latest
|
||||
needs: [deploy_preprod]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Remove Remote Environment
|
||||
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5
|
||||
with:
|
||||
host: ${{ env.SSH_HOST }}
|
||||
username: ${{ env.SSH_USER }}
|
||||
key: ${{ env.SSH_PRIVATE_KEY }}
|
||||
port: ${{ env.SSH_PORT }}
|
||||
script: |
|
||||
cd "${{ env.REMOTE_PREPROD_PATH }}"
|
||||
docker compose down || true
|
||||
|
||||
# # ------------------------------------------------------------------
|
||||
# # STAGE 4: DEPLOY PRODUCTION
|
||||
|
||||
Reference in New Issue
Block a user