Skip to content

Commit

Permalink
Merge pull request #80 from Eagle2gle/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
m4nd4r1n authored Mar 3, 2023
2 parents ae80ede + 2f99ae0 commit 0060dcd
Show file tree
Hide file tree
Showing 75 changed files with 2,748 additions and 506 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERVER_DOMAIN=http://wealth-server.kro.kr
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_HOST=http://localhost:3000
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_HOST=http://wealth-marble.kro.kr
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
"version": "detect"
}
},
"plugins": ["import", "react", "react-refresh"],
"plugins": ["import", "react"],
"rules": {
"eol-last": [1, "always"],
"react-refresh/only-export-components": "warn",
"import/no-unresolved": "off",
"import/order": [
"error",
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/CD-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CD

on:
pull_request:
types: [closed]
branches: [dev]

jobs:
cd-dev:
name: Deploy
environment:
name: development
url: http://wealth-marble-dev.kro.kr/
runs-on: ubuntu-latest
steps:
- name: SSH Remote Commands
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
timeout: 30s
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd wealth-marble-frontend-dev
git pull
npm i -f
npm run build
pm2 delete wealth-marble-dev
pm2 start npm --name "wealth-marble-dev" -- run start:dev
3 changes: 3 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
cd:
name: Deploy
environment:
name: production
url: http://wealth-marble.kro.kr/
runs-on: ubuntu-latest
steps:
- name: SSH Remote Commands
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ jobs:
shell: bash
run: |
echo "${{ secrets.SENTRY_TOKEN }}" > .sentryclirc
- name: Create .env
shell: bash
run: |
echo "${{ secrets.ENVIRONMENTS }}" > .env
- name: Build Test
run: npm run build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

.env
# Sentry
.sentryclirc
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const moduleExports = {
},

async rewrites() {
return [{ source: '/api/:path*', destination: `http://13.125.187.195:8080/api/:path*` }];
return [{ source: '/api/:path*', destination: `${process.env.SERVER_DOMAIN}/api/:path*` }];
},
sentry: {
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
Expand Down
Loading

0 comments on commit 0060dcd

Please sign in to comment.