test(actions): add connection test #4
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
name: Deploy | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
#------------------- EC2 -------------------- | |
- name: AWS EC2 Connection Test | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
password: ${{ secrets.EC2_PASSWORD }} | |
port: ${{ secrets.EC2_SSH_PORT }} | |
timeout: 60s | |
script: echo "Connection Test" | |
# AWS EC2 Server Connect & Docker 명령어 실행 | |
- name: AWS EC2 Run Scripts | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
password: ${{ secrets.EC2_PASSWORD }} | |
port: ${{ secrets.EC2_SSH_PORT }} | |
timeout: 60s | |
script: | | |
cd /usr/share/nginx/html/client-web | |
sudo git pull origin main |