Skip to content

Commit c910bc7

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/navigation
2 parents ae8f263 + 02f6b9d commit c910bc7

File tree

92 files changed

+5314
-960
lines changed

Some content is hidden

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

92 files changed

+5314
-960
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ on:
1515
options:
1616
- dev
1717
- prod
18+
APPLICATION:
19+
description: "Application to deploy"
20+
required: true
21+
default: pyconkr
22+
type: choice
23+
options:
24+
- pyconkr-frontend
25+
- pyconkr-admin
1826
push:
1927
branches:
2028
- "main"
@@ -30,8 +38,11 @@ jobs:
3038
env:
3139
API_STAGE: ${{ github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev' }}
3240
BUMP_RULE: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && '--mode development' || '' }}
33-
AWS_S3_BUCKET: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_S3_BUCKET_DEV || secrets.AWS_S3_BUCKET_PROD }}
34-
AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_DEV || secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_PROD }}
41+
AWS_S3_PYCONKR_FRONTEND_BUCKET: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_S3_PYCONKR_FRONTEND_BUCKET_DEV || secrets.AWS_S3_PYCONKR_FRONTEND_BUCKET_PROD }}
42+
AWS_S3_PYCONKR_ADMIN_BUCKET: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_S3_PYCONKR_ADMIN_BUCKET_DEV || secrets.AWS_S3_PYCONKR_ADMIN_BUCKET_PROD }}
43+
AWS_CLOUDFRONT_PYCONKR_FRONTEND_DISTRIBUTION_ID: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_CLOUDFRONT_PYCONKR_FRONTEND_DISTRIBUTION_ID_DEV || secrets.AWS_CLOUDFRONT_PYCONKR_FRONTEND_DISTRIBUTION_ID_PROD }}
44+
AWS_CLOUDFRONT_PYCONKR_ADMIN_DISTRIBUTION_ID: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_CLOUDFRONT_PYCONKR_ADMIN_DISTRIBUTION_ID_DEV || secrets.AWS_CLOUDFRONT_PYCONKR_ADMIN_DISTRIBUTION_ID_PROD }}
45+
DEPLOY_TARGET_APPLICATION: ${{ (github.event_name == 'workflow_dispatch' && inputs.APPLICATION || 'pyconkr-frontend') == 'pyconkr-frontend' && 'pyconkr' || 'pyconkr-admin' }}
3546

3647
steps:
3748
- uses: actions/checkout@master
@@ -55,10 +66,8 @@ jobs:
5566

5667
- run: mkdir -p dist
5768

58-
- run: pnpm build:@apps/pyconkr ${{ env.BUMP_RULE }} && cp -r apps/pyconkr/dist/* dist/
59-
60-
- run: pnpm build:@frontend && cp packages/common/dist/common.esm.js{,.map} dist/ && cp packages/shop/dist/shop.esm.js{,.map} dist/
69+
- run: pnpm build:@apps/${{ env.DEPLOY_TARGET_APPLICATION }} ${{ env.BUMP_RULE }} && cp -r apps/${{ env.DEPLOY_TARGET_APPLICATION }}/dist/* dist/
6170

62-
- run: aws s3 cp --recursive ./dist s3://${{ env.AWS_S3_BUCKET }}/
71+
- run: aws s3 cp --recursive ./dist s3://${{ (github.event_name == 'workflow_dispatch' && inputs.APPLICATION || 'pyconkr-frontend') == 'pyconkr-frontend' && env.AWS_S3_PYCONKR_FRONTEND_BUCKET || env.AWS_S3_PYCONKR_ADMIN_BUCKET }}/
6372

64-
- run: aws cloudfront create-invalidation --distribution-id ${{ env.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
73+
- run: aws cloudfront create-invalidation --distribution-id ${{ (github.event_name == 'workflow_dispatch' && inputs.APPLICATION || 'pyconkr-frontend') == 'pyconkr-frontend' && env.AWS_CLOUDFRONT_PYCONKR_FRONTEND_DISTRIBUTION_ID || env.AWS_CLOUDFRONT_PYCONKR_ADMIN_DISTRIBUTION_ID }} --paths "/*"

apps/pyconkr-admin/index.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charSet="UTF-8" />
5+
<base href="/" />
6+
<link rel="icon" href="/favicon.ico" sizes="32x32">
7+
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
8+
<link rel="apple-touch-icon" href="/favicon-180.png">
9+
10+
<meta name="theme-color" content="#fff" />
11+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#fff" />
12+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#fff" />
13+
14+
<meta name="msapplication-navbutton-color" content="#fff" />
15+
<meta name="msapplication-TileColor" content="#fff" />
16+
<meta name="msapplication-TileImage" content="/favicon-192.png" />
17+
<meta name="application-name" content="PyCon KR Admin" />
18+
<meta name="apple-mobile-web-app-title" content="PyCon KR Admin" />
19+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
20+
<meta name="apple-mobile-web-app-capable" content="yes" />
21+
<meta name="mobile-web-app-capable" content="yes" />
22+
<!-- https://developers.google.com/web/fundamentals/web-app-manifest/ -->
23+
<link rel="manifest" href="/site.webmanifest" />
24+
25+
<meta name="viewport" content="width=device-width,
26+
height=device-height,
27+
target-densitydpi=device-dpi,
28+
initial-scale=1.0,
29+
minimum-scale=1.0,
30+
maximum-scale=1.0,
31+
user-scalable=0,
32+
user-scalable=no,
33+
shrink-to-fit=no" />
34+
<meta name="author" content="PyCon Korea Organizing Team" />
35+
<meta name="description" content="Teaser site for PyCon Korea 2025" />
36+
<meta name="keywords" content="PyCon, Python, Conference, Korea, 2025" />
37+
<meta name="google" content="notranslate" />
38+
<meta name="googlebot" content="index, follow" />
39+
<meta name="robots" content="index, follow" />
40+
41+
<script src="https://cdn.iamport.kr/v1/iamport.js"></script>
42+
43+
<style>
44+
html, body, main {
45+
background-color: #f0f0f0;
46+
}
47+
48+
a {
49+
text-decoration: none;
50+
}
51+
</style>
52+
53+
<title>PyCon Korea Admin</title>
54+
</head>
55+
<body>
56+
<div id="root"></div>
57+
<script type="module" src="./src/main.tsx"></script>
58+
</body>
59+
</html>

apps/pyconkr-admin/package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@apps/pyconkr-admin",
3+
"dependencies": {
4+
"@frontend/common": "workspace:*",
5+
"@frontend/shop": "workspace:*"
6+
},
7+
"devDependencies": {
8+
"vite": "^6.3.5",
9+
"vite-plugin-mdx": "^3.6.1",
10+
"vite-plugin-mkcert": "^1.17.8",
11+
"vite-plugin-svgr": "^4.3.0"
12+
}
13+
}
3.78 KB
Loading
4.27 KB
Loading
15.2 KB
Loading
1.35 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "PyCon Korea Admin",
3+
"icons": [
4+
{
5+
"src": "favicon-192.png",
6+
"type": "image/png",
7+
"sizes": "192x192"
8+
},
9+
{
10+
"src": "favicon-512.png",
11+
"type": "image/png",
12+
"sizes": "512x512",
13+
"purpose": "maskable"
14+
},
15+
{
16+
"src": "favicon-512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"id": "/",
22+
"start_url": "/",
23+
"scope": "/",
24+
"display": "standalone"
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import * as Common from "@frontend/common";
2+
import { CircularProgress } from "@mui/material";
3+
import { ErrorBoundary, Suspense } from "@suspensive/react";
4+
import * as React from "react";
5+
import { Navigate } from "react-router-dom";
6+
7+
import { addSnackbar } from "../../utils/snackbar";
8+
9+
export const BackendAdminSignInGuard: React.FC<{ children: React.ReactNode }> =
10+
ErrorBoundary.with(
11+
{ fallback: <>로그인 정보를 불러오는 중 문제가 발생했습니다.</> },
12+
Suspense.with({ fallback: <CircularProgress /> }, ({ children }) => {
13+
const backendAdminAPIClient =
14+
Common.Hooks.BackendAdminAPI.useBackendAdminClient();
15+
const { data } = Common.Hooks.BackendAdminAPI.useSignedInUserQuery(
16+
backendAdminAPIClient
17+
);
18+
19+
if (!data) {
20+
addSnackbar("로그인 후 이용해주세요.", "error");
21+
return <Navigate to="/account/sign-in" replace />;
22+
}
23+
return children;
24+
})
25+
);

0 commit comments

Comments
 (0)