-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,30 +23,31 @@ jobs: | |
run: | | ||
docker push ${{ secrets.DOCKER_USERNAME }}/my-vue-app:latest | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Test SSH Connection | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.EC2_HOST }} | ||
username: ${{ secrets.EC2_USER }} | ||
key: ${{ secrets.EC2_KEY }} | ||
port: 22 | ||
script: | | ||
echo "SSH connection successful!" | ||
- name: Deploy to EC2 | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.EC2_HOST }} | ||
username: ${{ secrets.EC2_USER }} | ||
key: ${{ secrets.EC2_KEY }} | ||
port: 22 | ||
script: | | ||
docker pull ${{ secrets.DOCKER_USERNAME }}/my-vue-app:latest | ||
docker stop my-vue-app || true | ||
docker rm my-vue-app || true | ||
docker run -d -p 80:80 --name my-vue-app ${{ secrets.DOCKER_USERNAME }}/my-vue-app:latest | ||
# deploy ์น์ ์ ์ญ์ ํ๊ฑฐ๋ ์ฃผ์ ์ฒ๋ฆฌํ์ฌ EC2 ๋ฐฐํฌ๋ฅผ ์ค์งํฉ๋๋ค. | ||
# deploy: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Test SSH Connection | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.EC2_HOST }} | ||
# username: ${{ secrets.EC2_USER }} | ||
# key: ${{ secrets.EC2_KEY }} | ||
# port: 22 | ||
# script: | | ||
# echo "SSH connection successful!" | ||
|
||
# - name: Deploy to EC2 | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.EC2_HOST }} | ||
# username: ${{ secrets.EC2_USER }} | ||
# key: ${{ secrets.EC2_KEY }} | ||
# port: 22 | ||
# script: | | ||
# docker pull ${{ secrets.DOCKER_USERNAME }}/my-vue-app:latest | ||
# docker stop my-vue-app || true | ||
# docker rm my-vue-app || true | ||
# docker run -d -p 80:80 --name my-vue-app ${{ secrets.DOCKER_USERNAME }}/my-vue-app:latest |