ci(.github): AWS EC2 환경에 맞도록 SSH 접속 설정 변경 #7
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: CI via SSH (Deploy) | |
on: | |
push: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
name: CI via SSH (Deploy) | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOSTNAME }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
# 서버 쉘 프로파일에 자동으로 아래의 환경에서 시작되도록 설정했음을 전제로 함. | |
# /app 경로에서, 가상환경 상태로 시작 | |
script: | | |
sudo su | |
cd ~/be-django/app | |
source ../venv/bin/activate | |
tools/update |