diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..84e4c6f --- /dev/null +++ b/.github/workflows/cd.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dad008a --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..0b97fcf --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./fast-cloud-client/* ./output +cp -R ./output ./fast-cloud-client/ \ No newline at end of file diff --git a/src/shared/styles/tokens/colors.css.ts b/src/shared/styles/tokens/colors.css.ts index 927c8fd..bcc6524 100644 --- a/src/shared/styles/tokens/colors.css.ts +++ b/src/shared/styles/tokens/colors.css.ts @@ -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%)', diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..1323cda --- /dev/null +++ b/vercel.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/(.*)", + "destination": "/index.html" + } + ] +}