Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
miro-ring committed Jan 4, 2024
1 parent 4138a56 commit ac73385
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create and publish a Docker image to AWS ECR ans deploy to EC2
on:
push:
branches:
- main
- feature/BAR-140

env:
REGISTRY: ${{ secrets.AWS_ECR_REGISTRY }}
Expand Down Expand Up @@ -48,9 +48,12 @@ jobs:
ssh -i private_key.pem -o StrictHostKeyChecking=no ubuntu@${{ secrets.EC2_PUBLIC_DOMAIN }} "
aws ecr get-login-password --region ap-northeast-2 |
sudo docker login --username AWS --password-stdin ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} &&
if [ \$(sudo docker ps -q -f name=${{ env.IMAGE_NAME }}) ]; then
containerId=$(sudo docker ps -q -f name=${{ env.IMAGE_NAME }}) &&
imageId=$(sudo docker inspect -f '{{.Image}}' $containerId) &&
if [ \containerId ]; then
sudo docker stop ${{ env.IMAGE_NAME }} &&
sudo docker rm ${{ env.IMAGE_NAME }}
sudo docker rm ${{ env.IMAGE_NAME }} &&
sudo docker rmi $imageId
fi &&
sudo docker image pull ${{ steps.meta.outputs.tags }} &&
sudo docker container run --name ${{ env.IMAGE_NAME }} -d -p 3000:3000 ${{ steps.meta.outputs.tags }}"
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const HomePage = () => {
return <div>바로</div>;
return <div>바로됨</div>;
};

export default HomePage;

0 comments on commit ac73385

Please sign in to comment.