Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
HiHoi committed Jan 15, 2024
2 parents e3d42cb + 3de3a09 commit 271dd93
Show file tree
Hide file tree
Showing 57 changed files with 2,027 additions and 1,414 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test server CI/CD

on:
push:
branches: ['main', 'develop']
pull_request:
branches: ['main', 'develop']
types: ['opened', 'reopened', 'synchronize', 'closed']

jobs:
CI:
name: Test CI!! ๐Ÿ˜ƒ
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- name: Checkout ๐Ÿ
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Check current directory
run: |
echo "Current directory:"
pwd
echo "Directory content:"
ls -la
- name: Change to project dic
run: cd /home/runner/work/Peer-Frontend/Peer-Frontend

- name: Install packages
run: npm i /home/runner/work/Peer-Frontend/Peer-Frontend

- name: Prettier
working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend
run: npm run format

- name: Lint
working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend
run: npm run lint

- name: Build Test
working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend
run: npm run build

CD:
name: Test CD ๐Ÿ‘ป
if: github.ref == 'refs/heads/develop' && (github.event.pull_request.merged == true || github.event_name == 'push')
runs-on: ubuntu-latest
needs: CI
steps:
- name: Checkout ๐Ÿ
uses: actions/checkout@v2

- name: Build and push Docker image
run: |
touch /home/runner/work/Peer-Frontend/Peer-Frontend/.env.production
echo "${{ secrets.ENV_FILE }}" >> /home/runner/work/Peer-Frontend/Peer-Frontend/.env.production
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_TEST_IMAGE }} .
docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_TEST_IMAGE }}
- name: Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_TEST_HOST }}
port: 22
username: ${{ secrets.DEV_TEST_USERNAME }}
password: ${{ secrets.DEV_TEST_KEY }}
script: |
docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_TEST_IMAGE }}
docker rm -f ${{ secrets.DOCKER_DEV_TEST_IMAGE }}
docker run -d -p 3000:3000 ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_TEST_IMAGE }}
docker container prune -f
docker image prune -f
8 changes: 0 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ const nextConfig = withPWA({
'kr1-api-object-storage.nhncloudservice.com',
],
},
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'https://back.peer-test.co.kr/api/:path*',
},
]
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
Expand Down
120 changes: 0 additions & 120 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/location.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export const locationData: ILocation[] = [
],
},
{
name: '์ œ์ฃผ๋„',
name: '์ œ์ฃผํŠน๋ณ„์ž์น˜๋„',
subArea: ['์„œ๊ท€ํฌ์‹œ', '์ œ์ฃผ์‹œ'],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/hitchhiking/panel/HitchhikingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ const HitchhikingCard = ({
...sx,
backfaceVisibility: 'hidden',
transform: 'translate(-50%, 0)',
width: isPc ? '90%' : '90vw',
}}
onClick={handleMouseUp}
cardWidth={cardWidth}
/>
<HitchhikingCardBack
postId={postId}
Expand Down
2 changes: 1 addition & 1 deletion src/app/my-page/homepage-setting/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import useMedia from '@/hook/useMedia'

interface IToast {
severity: AlertColor | undefined
message: string
message: React.ReactNode
}

const HomepageSetting = () => {
Expand Down
14 changes: 11 additions & 3 deletions src/app/my-page/homepage-setting/panel/KeywordSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface IChip {

interface IToastProps {
severity: AlertColor | undefined
message: string
message: React.ReactNode
}

const KeywordAddingField = ({
Expand Down Expand Up @@ -68,7 +68,11 @@ const KeywordAddingField = ({
.then(() => {
setToastMessage({
severity: 'success',
message: `'${trimmed}'๋ฅผ ์•Œ๋ฆผ ํ‚ค์›Œ๋“œ ๋ชฉ๋ก์— ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค.`,
message: (
<>
<b>{trimmed}</b>(์ด)๊ฐ€ ํ‚ค์›Œ๋“œ๋กœ ๋“ฑ๋ก๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
</>
),
})
mutate()
})
Expand All @@ -81,7 +85,11 @@ const KeywordAddingField = ({
} else {
setToastMessage({
severity: 'error',
message: `'${trimmed}'๋ฅผ ์•Œ๋ฆผ ํ‚ค์›Œ๋“œ ๋ชฉ๋ก์— ์ถ”๊ฐ€ํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.`,
message: (
<>
<b>{trimmed}</b>(์„)๋ฅผ ์•Œ๋ฆผ ํ‚ค์›Œ๋“œ ๋ชฉ๋ก์— ์ถ”๊ฐ€ํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.
</>
),
})
}
})
Expand Down
2 changes: 2 additions & 0 deletions src/app/my-page/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useRouter } from 'next/navigation'
import MyInfoCard from './panel/MyInfoCard'
import useMedia from '@/hook/useMedia'
import * as style from '../panel/my-page.style'
import MyPortfolio from './panel/MyPortfolio'

interface IModals {
introduction: boolean
Expand Down Expand Up @@ -121,6 +122,7 @@ const MyProfile = () => {
handleLogout={handleLogout}
/>

<MyPortfolio />
{/* modals */}
<ProfileBioEditor
data={{
Expand Down
Loading

0 comments on commit 271dd93

Please sign in to comment.