-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from boostcampwm-2021/develop
[develop] merge to main
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CD | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
types: [closed] | ||
branches: [ develop ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
#if: github.event.pull_request.merged | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# Runs a single command using the runners shell | ||
- name: Run a one-line script | ||
run: echo Hello, world! | ||
|
||
- name: ncloud CD | ||
uses: appleboy/ssh-action@master | ||
with: | ||
key: ${{secrets.SSH_PRIVATE_KEY}} | ||
host: ${{secrets.REMOTE_HOST}} | ||
username: ${{secrets.REMOTE_USERNAME}} | ||
port: ${{secrets.REMOTE_PORT_NUMBER}} | ||
script: sh /var/www/app/web24-boostris/deploy.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cd /var/www/app/web24-boostris | ||
git fetch --all | ||
git reset --hard origin/main | ||
cd /var/www/app/web24-boostris/front-end | ||
npm ci | ||
npm run build | ||
rm -rf /var/www/html/* | ||
cp -r /var/www/app/web24-boostris/front-end/build/* /var/www/html | ||
cd /var/www/app/web24-boostris/back-end/api-server | ||
pm2 reload ts-node |