File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 4949 uses : actions/checkout@v4
5050
5151 - name : Setting for Developent
52- run : echo "${{ secrets.APPLICATION_DEV_YML }}" > src/main/resources/application-dev.yml
52+ run : |
53+ mkdir -p src/main/resources
54+ echo "${{ secrets.APPLICATION_DEV_YML }}" > src/main/resources/application-dev.yml
5355
5456 - name : Sign in github container registry
5557 uses : docker/login-action@v3
7577 push : true
7678 tags : ${{ steps.meta.outputs.tags }}
7779 labels : ${{ steps.meta.outputs.labels }}
80+
81+ deploy :
82+ name : EC2 자동 배포
83+ runs-on : ubuntu-latest
84+ needs : build-image
85+
86+ steps :
87+ - name : EC2에 SSH로 접속 후 배포
88+ 89+ with :
90+ host : ${{ secrets.EC2_HOST }}
91+ username : ${{ secrets.EC2_USERNAME }}
92+ key : ${{ secrets.EC2_SSH_KEY }}
93+ port : ${{ secrets.EC2_PORT }}
94+ script : |
95+ cd ${{ secrets.EC2_DEPLOY_DIR }}
96+ docker compose pull
97+ docker compose down
98+ docker compose up -d
You can’t perform that action at this time.
0 commit comments