Skip to content

Commit

Permalink
CI: fix ci deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lifnaja committed Mar 31, 2024
1 parent e109b7d commit 4f1a089
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,19 @@ jobs:
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v1.0.3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}:${{ github.ref_name }}
DOCKER_IMAGE_WITH_TAG: ${{ env.DOCKER_IMAGE }}:${{ github.ref_name }}
with:
host: ${{ secrets.HOST_DEV }}
username: ubuntu
key: ${{ secrets.HOST_DEV_KEY }}
port: 22
envs: AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,DOCKER_IMAGE
envs: DOCKER_IMAGE_WITH_TAG
script: |
export $AWS_ACCESS_KEY_ID
export $AWS_SECRET_ACCESS_KEY
export $DOCKER_IMAGE
export $DOCKER_IMAGE_WITH_TAG
echo "hello"
echo "$DOCKER_IMAGE"
echo "$DOCKER_IMAGE_WITH_TAG"
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 844772501268.dkr.ecr.ap-southeast-1.amazonaws.com
docker pull $DOCKER_IMAGE
docker run -p 3000:3001 $DOCKER_IMAGE
docker pull $DOCKER_IMAGE_WITH_TAG
docker run -p 3000:3001 $DOCKER_IMAGE_WITH_TAG

0 comments on commit 4f1a089

Please sign in to comment.