Skip to content

Commit

Permalink
Revert "production 1,2 관련 코드 삭제 (#494)"
Browse files Browse the repository at this point in the history
This reverts commit de12cfe.
  • Loading branch information
neverlish committed May 27, 2023
1 parent 19066c3 commit 1282faf
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-production-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Deploy production-1 server to ec2

on:
push:
branches:
- production-1

jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
defaults:
run:
working-directory: ${{ env.SERVER_PROFILE }}
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.SERVER_PROFILE }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: cp ~/config-injection/ecosystem-${{ env.SERVER_PROFILE }}.json ${{ env.PROJECT_PATH }}/ecosystem.json
- run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env
- run: bash ${{ env.PROJECT_PATH }}/script/prebuild.sh
- run: sh ${{ env.PROJECT_PATH }}/script/reload.sh
env:
NODE_ENV: production
SERVER_PROFILE: production-1
PROJECT_PATH: ~/actions-runner/_work/A.fume.Server/A.fume.Server/production-1
36 changes: 36 additions & 0 deletions .github/workflows/deploy-production-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Deploy production-2 server to ec2

on:
push:
branches:
- production-2

jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
defaults:
run:
working-directory: ${{ env.SERVER_PROFILE }}
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.SERVER_PROFILE }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: cp ~/config-injection/ecosystem-${{ env.SERVER_PROFILE }}.json ${{ env.PROJECT_PATH }}/ecosystem.json
- run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env
- run: bash ${{ env.PROJECT_PATH }}/script/prebuild.sh
- run: sh ${{ env.PROJECT_PATH }}/script/reload.sh
env:
NODE_ENV: production
SERVER_PROFILE: production-2
PROJECT_PATH: ~/actions-runner/_work/A.fume.Server/A.fume.Server/production-2
2 changes: 1 addition & 1 deletion .github/workflows/exec-mocha-integral-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Execute Mocha Integral Test

on:
pull_request:
branches: [dev, main]
branches: [dev, main, production-1, production-2]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/exec-mocha-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Execute Mocha Unit Test

on:
pull_request:
branches: [dev, main]
branches: [dev, main, production-1, production-2]

jobs:
build:
Expand Down

0 comments on commit 1282faf

Please sign in to comment.