RELEASE: ssl 인증서 자동 발급 설정 및 dev 서버 관련 파일 삭제, vercel 설정 파일 추가 #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: Proxy Dockerfile Build | |
on: | |
pull_request: | |
branches: | |
- release | |
paths: | |
- "nginx/Dockerfile" | |
jobs: | |
proxy-build: | |
name: proxy-build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: GitHub Container Registry 로그인 | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: kumsil1006 | |
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
- name: Docker Compose 파일 운영 서버로 복사 | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.RELEASE_HOST }} | |
username: ${{ secrets.RELEASE_USERNAME }} | |
password: ${{ secrets.RELEASE_PASSWORD }} | |
port: ${{ secrets.RELEASE_PORT }} | |
source: "docker-compose.yml" | |
target: "oao" | |
- name: 운영 서버에서 Docker Compose 실행 | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.RELEASE_HOST }} | |
username: ${{ secrets.RELEASE_USERNAME }} | |
password: ${{ secrets.RELEASE_PASSWORD }} | |
port: ${{ secrets.RELEASE_PORT }} | |
script: | | |
echo ${{secrets.CONTAINER_REGISTRY_TOKEN}} | docker login ghcr.io -u kumsil1006 --password-stdin | |
docker pull ghcr.io/kumsil1006/oao-proxy | |
cd oao | |
docker-compose -f docker-compose.yml up -d | |
docker image prune | |
- name: 실패시 슬랙 메시지 전송 | |
if: ${{ failure() }} | |
uses: ./.github/actions/slack-notify | |
with: | |
slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} | |
- name: 성공시 슬랙 메시지 전송 | |
if: ${{ success() }} | |
uses: ./.github/actions/slack-notify | |
with: | |
status: success | |
slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }} |