Skip to content

๐Ÿ› ๏ธ ์œ ์ € ์ด๋ฆ„ / ๋‹‰๋„ค์ž„ ๋ถ„๋ฆฌ (#91) #63

๐Ÿ› ๏ธ ์œ ์ € ์ด๋ฆ„ / ๋‹‰๋„ค์ž„ ๋ถ„๋ฆฌ (#91)

๐Ÿ› ๏ธ ์œ ์ € ์ด๋ฆ„ / ๋‹‰๋„ค์ž„ ๋ถ„๋ฆฌ (#91) #63

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