Skip to content

Commit 2153ebb

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents 8a57316 + 986336a commit 2153ebb

File tree

5 files changed

+62
-29
lines changed

5 files changed

+62
-29
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
name: git push into another repo to deploy to vercel
1+
name: Deploy Frontend
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [ main ]
66

77
jobs:
8-
build:
8+
deploy:
99
runs-on: ubuntu-latest
10-
container: pandoc/latex
10+
1111
steps:
12-
- uses: actions/checkout@v2
13-
- name: Install mustache (to update the date)
14-
run: apk add ruby && gem install mustache
15-
- name: creates output
16-
run: sh ./build.sh
17-
- name: Pushes to another repository
18-
id: push_directory
19-
uses: cpina/github-action-push-to-another-repository@main
20-
env:
21-
API_TOKEN_GITHUB: ${{ secrets.AUTH_TOKEN }}
12+
- name: Deploy to EC2
13+
uses: appleboy/[email protected]
2214
with:
23-
source-directory: 'output'
24-
destination-github-username: Eunjin03
25-
destination-repository-name: client
26-
user-email: ${{ secrets.OFFICIAL_ACCOUNT_EMAIL }}
27-
commit-message: ${{ github.event.commits[0].message }}
28-
target-branch: main
29-
- name: Test get variable exported by push-to-another-repository
30-
run: echo $DESTINATION_CLONED_DIRECTORY
15+
host: ${{ secrets.REMOTE_IP }}
16+
username: ${{ secrets.REMOTE_USER }}
17+
key: ${{ secrets.REMOTE_PRIVATE_KEY }}
18+
port: ${{ secrets.REMOTE_SSH_PORT }}
19+
script: |
20+
cd /home/ubuntu/client # 프로젝트 디렉토리
21+
git pull origin main
22+
cd client
23+
npm install
24+
npm run build

src/api/meeting/meeting.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export const getMeetingId = () => {
77
});
88
};
99

10-
export const postScript = (data: any) => {
10+
export const postScript = (projectId: string, data: any) => {
1111
return Send({
1212
method: "post",
13-
url: "conference/script",
13+
url: `conference/${projectId}/script`,
1414
data: data
1515
});
1616
};

src/sass/helpers/_variables.sass

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ $gray-700: #545456
1515
$gray-800: #363638
1616
$gray-900: #161618
1717

18+
$purple-50: #EEE8FD
19+
$purple-100: #D3C6FA
1820
$purple-400: #7C55F4
1921
$purple-500: #5E35F0
2022
$purple-600: #4F31E9

src/views/meeting/components/MindMapComponent.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const MindMapComponent = ({
7474

7575
const meetingStart = () => {
7676
const client = new Client({
77-
brokerURL: "wss://3.39.11.168:8080/ws", // 서버 WebSocket URL q
77+
brokerURL: "ws://3.39.11.168:8080/ws", // 서버 WebSocket URL q
7878
reconnectDelay: 5000,
7979
debug: (str) => {
8080
console.log(str);
@@ -138,7 +138,7 @@ const MindMapComponent = ({
138138
projectId: conferenceData.projectId,
139139
scription: testString,
140140
};
141-
postScript(data).then((res: any) => {
141+
postScript(conferenceData.projectId, data).then((res: any) => {
142142
setScriptList([]);
143143

144144
setSummary((prev) => [
@@ -243,8 +243,6 @@ const MindMapComponent = ({
243243
useEffect(() => {
244244
setNodes(initialNodes);
245245
setEdges(initialEdges);
246-
247-
console.log(initialNodes, initialEdges);
248246
}, [initialNodes, initialEdges]); // 임시방편으로 만듦
249247

250248
const onConnect = useCallback(
@@ -280,6 +278,20 @@ const MindMapComponent = ({
280278
[nodes, edges]
281279
);
282280

281+
const ClickKeyword = (keyword: string) => {
282+
const newNode: Node = {
283+
id: `${Date.now()}`,
284+
type: "default",
285+
data: { label: keyword },
286+
position: {
287+
x: Math.random() * 250,
288+
y: Math.random() * 250,
289+
},
290+
};
291+
292+
setNodes((nds) => [...nds, newNode]);
293+
};
294+
283295
return (
284296
<div className="mind-map-container">
285297
{mode === "none" ? (
@@ -409,6 +421,7 @@ const MindMapComponent = ({
409421
className="keyword"
410422
id={x.id.toString()}
411423
key={x.id}
424+
onClick={() => {ClickKeyword(x.value)}}
412425
>
413426
{x.value}
414427
</button>
@@ -427,6 +440,7 @@ const MindMapComponent = ({
427440
className="keyword"
428441
id={x.id.toString()}
429442
key={x.id}
443+
onClick={() => {ClickKeyword(x.value)}}
430444
>
431445
{x.value}
432446
</button>

src/views/meeting/style/mind-map.sass

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,29 @@
5050
max-width: 100%
5151
max-height: 100%
5252

53+
.react-flow
54+
.react-flow__node
55+
+padding(8px 16px)
56+
border-radius: 10px
57+
border: 0
58+
font-size: 14px
59+
font-weight: bold
60+
61+
.react-flow__handle
62+
+size(4px, 4px)
63+
background-color: $purple-100
64+
65+
.react-flow__node-input
66+
color: $white
67+
background-color: $purple-600
68+
69+
.react-flow__node-default
70+
background-color: $purple-100
71+
72+
.react-flow__node-output
73+
background-color: $purple-50
74+
75+
5376
.middle-bar
5477
+size(435px, 64px)
5578
+flex-box(center, center)
@@ -214,7 +237,7 @@
214237
color: $page-color
215238
background-color: #EEE8FD
216239
border: 1px solid $page-color
217-
240+
218241
p
219242
+margin(top 5px)
220243
font-size: 12px

0 commit comments

Comments
 (0)