Skip to content

Commit 0cd18f5

Browse files
authored
Merge pull request #37 from TEAM-COMFIT/dev
[Deploy] ์ดˆ๊ธฐ ์„ธํŒ… ํ›„ 1์ฐจ ๋ฐฐํฌ ๐Ÿš€
2 parents 0355186 + 8a1c3c6 commit 0cd18f5

87 files changed

Lines changed: 8271 additions & 1084 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

โ€Ž.gitattributesโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.husky/* text eol=lf
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'โœจ Issue'
2+
description: '์ด์Šˆ๋ฅผ ๋“ฑ๋กํ•ด ์ฃผ์„ธ์š”.'
3+
title: '[Type] '
4+
5+
body:
6+
7+
- type: textarea
8+
attributes:
9+
label: '๐Ÿ“„ Description'
10+
description: ์ด์Šˆ ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
11+
placeholder: ๊ตฌ์ฒด์ ์œผ๋กœ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: 'โœ… To-do'
18+
description: ํ•ด์•ผ ํ•˜๋Š” ์ผ์„ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
19+
placeholder: |
20+
- [ ] ํ•ด์•ผ ํ•  ์ผ 1
21+
- [ ] ํ•ด์•ผ ํ•  ์ผ 2
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
attributes:
27+
label: '๐Ÿ“Ž ETC'
28+
description: ์ถ”๊ฐ€๋กœ ๊ณต์œ ํ•  ์‚ฌํ•ญ์ด ์žˆ์œผ๋ฉด ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.

โ€Ž.github/labeler.ymlโ€Ž

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
enable:
2+
issues: true
3+
prs: true
4+
5+
labels:
6+
"๐Ÿ›FIX":
7+
include: ['\bFix\b', '\bfix\b', '\bFIX\b', '\bBug\b', '\bbug\b', '\bBUG\b']
8+
9+
"๐ŸŒŸFEAT":
10+
include: ['\bFeat\b', '\bFEAT\b', '\bfeat\b']
11+
12+
"๐Ÿ“‘DOCS":
13+
include: ['\bDocs\b', '\bDOCS\b', '\bdocs\b']
14+
15+
"๐ŸŽ‰INIT":
16+
include: ['\bInit\b', '\bINIT\b', '\binit\b']
17+
18+
"๐ŸงSTYLE":
19+
include: ['\bStyle\b', '\bSTYLE\b', '\bstyle\b', '\bDesign\b', '\bDESIGN\b', '\bdesign\b']
20+
21+
"๐ŸงนCHORE":
22+
include: ['\bCHORE\b', '\bChore\b', '\bchore\b']
23+
24+
"๐Ÿ› ๏ธREFACTOR":
25+
include: ['\bRefactor\b', '\bREFACTOR\b', '\brefactor\b']
26+
27+
"๐Ÿ”ŽUPDATE":
28+
include: ['\bUpdate\b', '\bUPDATE\b', '\bupdate\b']
29+
30+
"๐Ÿš€DEPLOY":
31+
include: ['\bDeploy\b', '\bDEPLOY\b', '\bdeploy\b']
32+
33+
"๐ŸšจHOTFIX":
34+
include: ['\bHotfix\b', '\bHOTFIX\b', '\bhotfix\b']
35+
36+
"๐Ÿ”—API":
37+
include: ['\bAPI\b', '\bApi\b', '\bapi\b']
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## โœ๏ธ Summary
2+
<!-- ๊ด€๋ จ ์žˆ๋Š” Issue๋ฅผ ํƒœ๊ทธํ•ด์ฃผ์„ธ์š”. (e.g. > - #1) -->
3+
<!-- ํ•ด๋‹น PR์— ๋Œ€ํ•œ ์ž‘์—… ๋‚ด์šฉ์„ ์š”์•ฝํ•˜์—ฌ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. -->
4+
- close #
5+
6+
7+
## ๐Ÿ“‘ Tasks
8+
<!-- ํ•ด๋‹น PR์— ์ˆ˜ํ–‰ํ•œ ์ž‘์—…์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. -->
9+
-
10+
11+
12+
## ๐Ÿ‘€ To Reviewer
13+
<!-- ๋ฆฌ๋ทฐ์–ด์—๊ฒŒ ์š”์ฒญํ•˜๋Š” ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. -->
14+
-
15+
16+
## ๐Ÿ“ธ Screenshot
17+
<!-- ์ž‘์—…ํ•œ ๋‚ด์šฉ์— ๋Œ€ํ•œ ์Šคํฌ๋ฆฐ์ƒท์„ ์ฒจ๋ถ€ํ•ด์ฃผ์„ธ์š”. -->
18+
19+
## ๐Ÿ”” ETC

โ€Ž.github/workflows/cd.ymlโ€Ž

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: cd
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v5
12+
- name: creates output
13+
run: sh ./build.sh
14+
- name: Pushes to another repository
15+
id: push_directory
16+
uses: cpina/github-action-push-to-another-repository@main
17+
env:
18+
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }}
19+
with:
20+
source-directory: "output"
21+
destination-github-username: odukong
22+
destination-repository-name: COMFIT-CLIENT
23+
user-email: ${{ secrets.EMAIL }}
24+
commit-message: ${{ github.event.head_commit.message }}
25+
target-branch: ${{ github.ref_name }}
26+
- name: Test get variable exported by push-to-another-repository
27+
run: echo $DESTINATION_CLONED_DIRECTORY

โ€Ž.github/workflows/ci.ymlโ€Ž

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main, dev]
8+
9+
permissions:
10+
contents: read # ์ฝ”๋“œ ์ฝ๊ธฐ ๊ถŒํ•œ
11+
pull-requests: write # ์ž๋™๋ฆฌ๋ทฐ์–ด ์„ค์ •์„ ์œ„ํ•œ ์“ฐ๊ธฐ ๊ถŒํ•œ
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# ์ €์žฅ์†Œ ์ฝ”๋“œ ๋‹ค์šด๋กœ๋“œ
18+
- name: Checkout Code
19+
uses: actions/checkout@v5
20+
# pnpm ์„ค์น˜
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
25+
26+
# pnpm store ์บ์‹ฑ
27+
- name: Get pnpm store directory
28+
id: pnpm-cache
29+
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
30+
31+
- uses: actions/cache@v5
32+
with:
33+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
34+
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
35+
restore-keys: ${{ runner.os }}-pnpm-
36+
37+
# node.js ํ™˜๊ฒฝ ์„ค์ •
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v5
40+
with:
41+
node-version: "24.x"
42+
# ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜
43+
- name: Install dependencies
44+
run: pnpm install --frozen-lockfile
45+
# ํ”„๋กœ์ ํŠธ ๋ฆฐํŠธ ๊ฒ€์‚ฌ ๋ฐ ํƒ€์ž… ๊ฒ€์‚ฌ
46+
- name: Check project
47+
id: check_step
48+
run: pnpm run lint && pnpm exec tsc --noEmit
49+
continue-on-error: true
50+
# ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ
51+
- name: Build project
52+
id: build_step
53+
run: pnpm run build
54+
continue-on-error: true
55+
56+
# ๋นŒ๋“œ ๊ฒฐ๊ณผ
57+
- name: Output build result
58+
if: github.event_name == 'pull_request' && always()
59+
uses: marocchino/sticky-pull-request-comment@v2
60+
with:
61+
header: build-result
62+
message: |
63+
### ๐Ÿš€ ๋นŒ๋“œ ๊ฒฐ๊ณผ
64+
${{ steps.check_step.outcome == 'success' && 'โœ… **๋ฆฐํŠธ ๊ฒ€์‚ฌ ์™„๋ฃŒ**' || 'โŒ **๋ฆฐํŠธ ๊ฒ€์‚ฌ ์‹คํŒจ**'}}
65+
${{ steps.build_step.outcome == 'success' && 'โœ… **๋นŒ๋“œ ์„ฑ๊ณต**' || 'โŒ **๋นŒ๋“œ ์‹คํŒจ**' }}
66+
67+
<details>
68+
<summary>๋กœ๊ทธ ํ™•์ธํ•˜๊ธฐ</summary>
69+
<br>
70+
<a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">
71+
Actions ํƒญ์—์„œ ์ž์„ธํžˆ ๋ณด๊ธฐ
72+
</a>
73+
</details>
74+
75+
# ๋นŒ๋“œ ๊ฒฐ๊ณผ ๋””์Šค์ฝ”๋“œ ์•Œ๋žŒ ๋ณด๋‚ด๊ธฐ
76+
- name: Notify Discord Alarm
77+
if: github.event_name == 'pull_request' && always()
78+
run: |
79+
PR_TITLE="${{ github.event.pull_request.title }}"
80+
PR_USER="${{ github.event.pull_request.user.login }}"
81+
PR_URL="${{ github.event.pull_request.html_url }}"
82+
83+
if [ "${{ steps.build_step.outcome }}" == "success" ]; then
84+
COLOR=3066993
85+
TITLE="โœ… ๋นŒ๋“œ ์„ฑ๊ณต"
86+
else
87+
COLOR=15158332
88+
TITLE="โŒ ๋นŒ๋“œ ์‹คํŒจ"
89+
fi
90+
91+
DESCRIPTION="**๐Ÿš€ Title :** \`$PR_TITLE\`\n **๐Ÿ‘ค์ž‘์„ฑ์ž :** \`$PR_USER\`\n\n**[๐Ÿ”Ž PR๋ณด๋Ÿฌ๊ฐ€๊ธฐ]($PR_URL)**"
92+
curl -H "Content-Type: application/json" \
93+
-d "{
94+
\"embeds\": [{
95+
\"title\": \"$TITLE\",
96+
\"description\": \"$DESCRIPTION\",
97+
\"color\": $COLOR
98+
}]
99+
}" \
100+
"${{ secrets.DISCORD_WEBHOOK_URL }}"
101+
# ๋นŒ๋“œ ์‹คํŒจ ์‹œ, ์ข…๋ฃŒ
102+
- name: Check Build Status
103+
if: steps.check_step.outcome == 'failure' || steps.build_step.outcome == 'failure'
104+
run: exit 1
105+
assign:
106+
runs-on: ubuntu-latest
107+
steps:
108+
- name: auto-assign-author-and-reviewer
109+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
110+
uses: hkusu/review-assign-action@v1
111+
with:
112+
assignees: ${{github.actor}} # ๋‹ด๋‹น์ž ์„ค์ •
113+
reviewers: hummingbbird, odukong, u-zzn, qowjdals23
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Labeler
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
pull_request_target:
7+
types: [opened]
8+
9+
jobs:
10+
labeler:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
issues: write
15+
pull-requests: write
16+
steps:
17+
- name: Check Labels
18+
id: labeler
19+
uses: jimschubert/labeler-action@v1
20+
with:
21+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22+
23+
- name: Add labels based on user
24+
uses: actions/github-script@v7
25+
with:
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
script: |
28+
const author = context.payload.pull_request
29+
? context.payload.pull_request.user.login
30+
: context.payload.issue.user.login;
31+
32+
const userLabels = {
33+
"hummingbbird": "์ฑ„์˜๐Ÿฅฆ",
34+
"odukong": "์ˆ˜๋นˆ๐Ÿ‹",
35+
"u-zzn": "์œ ์ง„๐Ÿ’",
36+
"qowjdals23":"์ •๋ฏผ๐Ÿ",
37+
};
38+
39+
const labelToAdd = userLabels[author];
40+
41+
if (labelToAdd) {
42+
github.rest.issues.addLabels({
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
issue_number: context.payload.pull_request
46+
? context.payload.pull_request.number
47+
: context.payload.issue.number,
48+
labels: [labelToAdd]
49+
});
50+
}

โ€Ž.gitignoreโ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ dist-ssr
2424
*.sln
2525
*.sw?
2626

27-
.env
27+
.env
28+
*storybook.log
29+
storybook-static

โ€Ž.husky/commit-msgโ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
COMMIT_MSG_FILE="$1"
4+
COMMIT_MSG_HEADER=$(grep -v '^[[:space:]]*#' "$COMMIT_MSG_FILE" | head -n 1)
5+
6+
# Merge๋‚˜ Revert ์ปค๋ฐ‹์€ ๊ฒ€์‚ฌํ•˜์ง€ ์•Š๊ณ  ํ†ต๊ณผ์‹œํ‚ด
7+
if echo "$COMMIT_MSG_HEADER" | grep -Eq "^(Merge|Revert)"; then
8+
exit 0
9+
fi
10+
11+
PATTERN='^(init|feat|fix|design|update|remove|add|move|rename|docs|comment|refactor|test|chore|deploy): .+ \(#[0-9]+\)$'
12+
13+
# ์ปค๋ฐ‹ ์ปจ๋ฒค์…˜๊ณผ ์ผ์น˜ํ•˜๋Š”์ง€ ์ฒดํฌ
14+
if ! echo "$COMMIT_MSG_HEADER" | grep -Eq "$PATTERN"; then
15+
echo "๐Ÿšจ [์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€ ์—๋Ÿฌ] ํ˜•์‹์ด ์ปจ๋ฒค์…˜๊ณผ ๋‹ค๋ฆ…๋‹ˆ๋‹ค."
16+
echo "๐Ÿ‘‰ ๊ทœ์น™: <ํƒ€์ž…>: <๋‚ด์šฉ> (#<์ด์Šˆ๋ฒˆํ˜ธ>)"
17+
echo "๐Ÿ‘‰ ์˜ˆ์‹œ: feat: ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ ํผ๋ธ”๋ฆฌ์‹ฑ (#1)"
18+
exit 1
19+
fi
20+
21+
exit 0

โ€Ž.husky/pre-commitโ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
echo "๐Ÿถ Husky pre-commit ์‹คํ–‰"
4+
pnpm exec lint-staged || exit 1
5+
echo "๐ŸŽ‰ lint-staged ํ†ต๊ณผ"

0 commit comments

Comments
ย (0)