Skip to content

๐Ÿ› ๏ธ ํ˜„์‹ค์ ์ธ ํ™˜๊ฒฝ ๊ตฌ์ถ•์„ ์œ„ํ•ด ๋ชจ๋“  API์— ๋Œ€ํ•ด delay ์„ค์ • (#46) #34

๐Ÿ› ๏ธ ํ˜„์‹ค์ ์ธ ํ™˜๊ฒฝ ๊ตฌ์ถ•์„ ์œ„ํ•ด ๋ชจ๋“  API์— ๋Œ€ํ•ด delay ์„ค์ • (#46)

๐Ÿ› ๏ธ ํ˜„์‹ค์ ์ธ ํ™˜๊ฒฝ ๊ตฌ์ถ•์„ ์œ„ํ•ด ๋ชจ๋“  API์— ๋Œ€ํ•ด delay ์„ค์ • (#46) #34

Workflow file for this run

name: Continuous Deployment
on:
push:
branches: ['main']
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: false
permissions:
contents: read
jobs:
deployment:
runs-on: ubuntu-20.04
steps:
- name: Checkout pull request
uses: actions/checkout@v4
- name: Reuse setup action
uses: ./.github/actions/setup
# 7. Yarn ๋นŒ๋“œ ํŒŒ์ผ ์ƒ์„ฑ
- name: Yarn build
run: yarn build
# 8. Docker ์ด๋ฏธ์ง€ build ๋ฐ push
- name: Docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t pennyway/pennyway-webview .
docker push pennyway/pennyway-webview
# 9. AWS SSM์„ ํ†ตํ•œ Run-Command
- name: AWS SSM Send-Command
uses: peterkimzz/aws-ssm-send-command@master
id: ssm
with:
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
instance-ids: ${{ secrets.AWS_DEV_INSTANCE_ID }}
working-directory: /home/ubuntu
command: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker stop webview
docker system prune -a -f
docker pull pennyway/pennyway-webview
docker run --name "webview" -d -p 3000:3000 pennyway/pennyway-webview