diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a852f1c8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: Playwright Tests +on: + workflow_run: + workflows: + - CICD Web + types: + - completed + + +jobs: + test: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + env: + WEB_URL: ${{ github.event.workflow_run.outputs.deployment_url }} + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: pnpm + - name: pnpm install + run: pnpm install --frozen-lockfile --prefer-offline + + - name: setting environment variables + run: | + echo "${{ secrets.SHARED_ENV_FILE }}" >> packages/shared/.env + echo WEB_URL=${{ env.WEB_URL }} >> packages/shared/.env + + echo "${{ secrets.WEB_ENV_FILE }}" > packages/web/.env + echo NEXT_PUBLIC_WEB_URL=${{ env.WEB_URL }} >> packages/web/.env + + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: | + turbo telemetry disable + pnpm run test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/cicd-extension.yml b/.github/workflows/cicd-extension.yml index 92a3ee9e..d0e1338f 100644 --- a/.github/workflows/cicd-extension.yml +++ b/.github/workflows/cicd-extension.yml @@ -2,7 +2,6 @@ name: CICD Extension on: - push - - pull_request jobs: build-extension: diff --git a/.github/workflows/cicd-web.yml b/.github/workflows/cicd-web.yml index 3121d97c..6d1c3387 100644 --- a/.github/workflows/cicd-web.yml +++ b/.github/workflows/cicd-web.yml @@ -2,11 +2,12 @@ name: CICD Web on: - push - - pull_request jobs: build-web: runs-on: ubuntu-22.04 + outputs: + deployment_url: ${{ steps.deploy.outputs.url || steps.deploy-staging.outputs.url || steps.deploy-prod.outputs.url }} env: WEB_URL: "${{ github.ref == 'refs/heads/develop' && secrets.STAGING_WEB_URL || secrets.PROD_WEB_URL }}" steps: @@ -32,14 +33,25 @@ jobs: - name: Vercel Build run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - - name: Deploy staging when push on develop branch + - name: Deploy development + if: ${{ github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master' }} + id: deploy + run: | + VERCEL_DEPLOYED_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) + echo "url=$VERCEL_DEPLOYED_URL" >> "$GITHUB_OUTPUT" + + - name: Deploy staging if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop'}} + id: deploy-staging run: | - VERCEL_DEPOLYED_URL="$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" - vercel alias set "$VERCEL_DEPOLYED_URL" ${{secrets.STAGING_WEB_URL_WITHOUT_PROTOCOL}} --token=${{ secrets.VERCEL_TOKEN }} --scope=gueit214s-projects + VERCEL_DEPLOYED_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) + vercel alias set "$VERCEL_DEPLOYED_URL" ${{secrets.STAGING_WEB_URL_WITHOUT_PROTOCOL}} --token=${{ secrets.VERCEL_TOKEN }} --scope=gueit214s-projects + echo "url=$VERCEL_DEPLOYED_URL" >> "$GITHUB_OUTPUT" - - name: Deploy production when push on master branch + - name: Deploy production if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}} + id: deploy-prod run: | - VERCEL_DEPOLYED_URL="$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" - vercel --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file + VERCEL_DEPLOYED_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) + vercel alias set "$VERCEL_DEPLOYED_URL" ${{secrets.PROD_WEB_URL_WITHOUT_PROTOCOL}} --token=${{ secrets.VERCEL_TOKEN }} --scope=gueit214s-projects + echo "url=$VERCEL_DEPLOYED_URL" >> "$GITHUB_OUTPUT" \ No newline at end of file diff --git a/packages/web/src/app/[lng]/(no-auth)/login/_components/LoginSection/index.tsx b/packages/web/src/app/[lng]/(no-auth)/login/_components/LoginSection/index.tsx index 51875e7f..72a8c72d 100644 --- a/packages/web/src/app/[lng]/(no-auth)/login/_components/LoginSection/index.tsx +++ b/packages/web/src/app/[lng]/(no-auth)/login/_components/LoginSection/index.tsx @@ -1,9 +1,10 @@ 'use server'; +import { SUPABASE } from '@extension/shared/constants'; import { Button } from '@src/components/ui'; import type { LanguageType } from '@src/modules/i18n'; import useTranslation from '@src/modules/i18n/util.server'; -import { signInWithOAuth } from '@src/modules/supabase/util.server'; +import { signInWithEmail, signInWithOAuth } from '@src/modules/supabase/util.server'; import Image from 'next/image'; interface LoginSectionProps extends LanguageType {} @@ -19,21 +20,26 @@ export default async function LoginSection({ lng }: LoginSectionProps) {
{/* 'use server' 함수를 사용하기 위해 bind 사용 */} {/* 'use server' 함수를 사용하기 위해 bind 사용 */} - - {/* */} + {t('login.testLogin')} +
); diff --git a/packages/web/src/modules/i18n/locales/en/translation.json b/packages/web/src/modules/i18n/locales/en/translation.json index df257c85..fdefafff 100644 --- a/packages/web/src/modules/i18n/locales/en/translation.json +++ b/packages/web/src/modules/i18n/locales/en/translation.json @@ -127,6 +127,7 @@ "welcomeDescription": "Let's make memo-taking easier and more convenient together!", "kakaoLogin": "Continue with Kakao", "googleLogin": "Continue with Google", + "testLogin": "Continue with Test Account", "askGoInstallExtension": "Looks like you haven't installed our extension yet. You'll need it to use all the great memo features. Would you like to install it now?", "personalInformationInfo": "Don't worry! Your personal information is strictly protected and will never be used for marketing purposes." }, @@ -180,8 +181,8 @@ "description": "Ready to start? Press '{{key}} + S' to open the side panel" }, "save": { - "title": "Save memos", - "description": "Great! Now you can write memos. Don't worry, they save automatically" + "title": "Save Your Memos", + "description": "Great job!\nNow you can write memos in the side panel.\nDon't worry, memos are saved automatically" }, "check": { "title": "Check memos", diff --git a/packages/web/src/modules/i18n/locales/ko/translation.json b/packages/web/src/modules/i18n/locales/ko/translation.json index 2538abd4..7ebd6a65 100644 --- a/packages/web/src/modules/i18n/locales/ko/translation.json +++ b/packages/web/src/modules/i18n/locales/ko/translation.json @@ -127,6 +127,7 @@ "welcomeDescription": "웹 메모와 함께 더 쉽고 편리하게 메모를 관리해보세요.", "kakaoLogin": "카카오 계정으로 시작하기", "googleLogin": "구글 계정으로 시작하기", + "testLogin": "테스트 계정으로 로그인하기", "askGoInstallExtension": "메모 기능을 사용하시려면 확장 프로그램이 필요해요. 지금 설치하러 가시겠어요?", "personalInformationInfo": "고객님의 소중한 개인정보는 안전하게 보호되며, 마케팅 목적으로는 절대 사용되지 않아요." }, diff --git a/pages/content-ui/src/components/OpenSidePanelButton.tsx b/pages/content-ui/src/components/OpenSidePanelButton.tsx index bd357683..616d84ad 100644 --- a/pages/content-ui/src/components/OpenSidePanelButton.tsx +++ b/pages/content-ui/src/components/OpenSidePanelButton.tsx @@ -3,6 +3,7 @@ import { ExtensionBridge } from '@extension/shared/modules/extension-bridge'; export default function OpenSidePanelButton() { return (