Skip to content

Commit

Permalink
deploy with ssh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
guss84 committed Dec 1, 2023
1 parent 258d5b5 commit c34cfbc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ jobs:
key: ${{ secrets.TESTING_SSH_PRIVATE_KEY }}
host: ${{ secrets.TESTING_SSH_HOST }}
username: ${{ secrets.TESTING_USER_NAME }}
envs: DEPLOYMENT_NAME
script: echo "$DEPLOYMENT_NAME" > test.txt
envs: TESTING_ECR_REGISTRY, TESTING_ECR_REGISTRY_IMAGE
script: |
aws ecr get-login-password --region eu-central-1 | docker login --username AWS --password-stdin "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE"
docker pull "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:latest"
# stop and remove all containers
docker ps -aq | xargs docker stop | xargs docker rm
docker run -p 8000:8000 -d --env-file .env "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:latest"
Expand Down

0 comments on commit c34cfbc

Please sign in to comment.