Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: git push into another repo to deploy to vercel

on:
push:
branches: [main, develop]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: creates output
run: sh ./build.sh
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }}
with:
source-directory: 'output'
destination-github-username: jstar000
destination-repository-name: fast-cloud-client
user-email: ${{ secrets.EMAIL }}
commit-message: ${{ github.event.commits[0].message }}
target-branch: ${{ github.ref_name }}
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# CI 워크플로우: PR 및 Push 시 코드 품질 검사 및 빌드 수행
name: ci

on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]

permissions:
contents: read
pull-requests: write # PR 코멘트 작성 권한

jobs:
build:
# PR이거나, [skip ci]가 없는 push일 때만 실행
if: github.event_name == 'pull_request' || (github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]'))
runs-on: ubuntu-latest

steps:
# 1. 환경 설정
- name: Checkout repository
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

# 2. 코드 품질 검사, 실패 시 CI 실패
- name: Run lint
run: pnpm lint

- name: Check formatting
run: pnpm format:check

# 3. 빌드
- name: Build project with Vite
id: build
run: pnpm run build
continue-on-error: true # 빌드 실패해도 PR 코멘트 작성을 위해 계속 진행

# 4. 빌드 결과 처리
- name: Evaluate build status
id: status
run: |
result="failed"
message="빌드 실패 ⛔️"

if [ "${{ steps.build.outcome }}" == "success" ]; then
result="success"
message="빌드 성공 🥳"
fi

echo "result=$result" >> $GITHUB_OUTPUT
echo "message=$message" >> $GITHUB_OUTPUT

# 5. PR에 빌드 결과 코멘트
- name: Add comment to PR with build status
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
const message = `${{ steps.status.outputs.message }}`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: `### 빌드 결과\n${message}`
});

- name: Fail job if build failed
if: steps.build.outcome == 'failure'
run: exit 1
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
cd ../
mkdir output
cp -R ./fast-cloud-client/* ./output
cp -R ./output ./fast-cloud-client/
2 changes: 1 addition & 1 deletion src/shared/styles/tokens/colors.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const colors = {
bgGrad:
'radial-gradient(135.07% 124.3% at 50% -59.67%, rgba(0, 42, 140, 0.70) 0%, rgba(7, 9, 13, 0.00) 100%), #07090D',
cardGradPrimary:
'radial-gradient(574.85% 120.26% at 50% -15.34%, rgba(0, 89, 255, 0.00) 0%, rgba(0, 89, 255, 0.08) 61.09%, rgba(0, 89, 255, 0.24) 100%)',
'radial-gradient(574.85% 120.26% at 50% -15.34%, rgba(0, 89, 255, 0.00) 0%, rgba(0, 89, 255, 0.08) 61.09%, rgba(0, 89, 255, 0.24) 100%);',
cardGradGray:
'radial-gradient(116.61% 120.26% at 50% -15.34%, rgba(137, 150, 169, 0.00) 29.33%, rgba(137, 150, 169, 0.06) 61.54%, rgba(137, 150, 169, 0.15) 100%)',

Expand Down
8 changes: 8 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}