Skip to content

Commit 570a824

Browse files
committed
feat: workflow init
1 parent e9c1846 commit 570a824

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/prod-deploy.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,29 @@ jobs:
6161
run: |
6262
cat .env
6363
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
64-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
64+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
65+
66+
deploy-frontend-service:
67+
name: Deploy to Frontend Service
68+
runs-on: ubuntu-latest
69+
needs: Build
70+
steps:
71+
- name: Git Checkout
72+
uses: actions/checkout@v2
73+
- name: Echo Branch
74+
run: echo running on branch ${GITHUB_REF##*/}
75+
- uses: actions/setup-node@v3
76+
with:
77+
node-version: 18
78+
- name: Deploy to server
79+
uses: appleboy/ssh-action@master
80+
with:
81+
host: ${{ secrets.PROD_SERVER_IP }}
82+
username: ${{ secrets.PROD_SERVER_USERNAME }}
83+
port: ${{ secrets.PORT }}
84+
key: ${{ secrets.PROD_SERVER_SSH_KEY }}
85+
script: |
86+
eval "$(ssh-agent -s)"
87+
ssh-add ~/.ssh/action
88+
cd /home/ubuntu/deploy
89+
docker compose up -d%

0 commit comments

Comments
 (0)