Skip to content

Commit 6dfbc21

Browse files
authored
Merge pull request #1 from shield-auth/develop
vercel deploy pipeline, imgae and font optimization added
2 parents b67445c + aeb691a commit 6dfbc21

File tree

11 files changed

+70
-76
lines changed

11 files changed

+70
-76
lines changed

.github/workflows/cd.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/vercel-deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# vercel-deploy.yml
2+
name: Deploy to vercel on merge
3+
4+
on:
5+
push:
6+
branches:
7+
- trunk
8+
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: amondnet/vercel-action@v20
15+
with:
16+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
17+
github-token: ${{ secrets.ACCESS_TOKEN }}
18+
vercel-args: "--prod"
19+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
20+
vercel-project-id: ${{ secrets.VERCEL_PROJ_ID}}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# vercel-pull-request.yml
2+
name: Create vercel preview URL on pull request
3+
on:
4+
pull_request:
5+
branches:
6+
- trunk
7+
8+
jobs:
9+
build_and_deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
repository-projects: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: amondnet/vercel-action@v20
18+
id: vercel-deploy
19+
with:
20+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
21+
github-token: ${{ secrets.ACCESS_TOKEN }}
22+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
23+
vercel-project-id: ${{ secrets.VERCEL_PROJ_ID }}
24+
- name: preview-url
25+
run: |
26+
echo ${{ steps.vercel-deploy.outputs.preview-url }}

bun.lockb

7.81 KB
Binary file not shown.

next.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
/* config options here */
5-
output: "export",
65
};
76

87
export default nextConfig;

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@
1313
"@radix-ui/react-slot": "^1.1.0",
1414
"class-variance-authority": "^0.7.0",
1515
"clsx": "^2.1.1",
16-
"lucide-react": "^0.453.0",
17-
"next": "15.0.1",
16+
"lucide-react": "^0.454.0",
17+
"next": "15.0.2",
1818
"next-themes": "^0.3.0",
1919
"react": "19.0.0-rc-69d4b800-20241021",
2020
"react-dom": "19.0.0-rc-69d4b800-20241021",
2121
"tailwind-merge": "^2.5.4"
2222
},
2323
"devDependencies": {
24+
"@next/eslint-plugin-next": "^15.0.2",
2425
"@tailwindcss/typography": "^0.5.15",
25-
"@types/node": "^20",
26+
"@types/node": "^22",
2627
"@types/react": "^18",
2728
"@types/react-dom": "^18",
2829
"eslint": "^8",
29-
"eslint-config-next": "15.0.1",
30+
"eslint-config-next": "15.0.2",
3031
"postcss": "^8",
31-
"tailwindcss": "^3.4.1",
32+
"tailwindcss": "^3.4.14",
3233
"tailwindcss-animate": "^1.0.7",
3334
"typescript": "^5"
3435
}

src/app/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&display=swap");
21
@tailwind base;
32
@tailwind components;
43
@tailwind utilities;

src/app/layout.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
import "./globals.css";
22

33
import type { Metadata, Viewport } from "next";
4-
import localFont from "next/font/local";
4+
import { Roboto_Slab } from "next/font/google";
55
import { ThemeProvider } from "~/components/providers/theme-provider";
66
import { CLIENT } from "~/lib/constants/config";
77

8-
const geistSans = localFont({
9-
src: "./fonts/GeistVF.woff",
10-
variable: "--font-geist-sans",
11-
weight: "100 900",
12-
});
13-
const geistMono = localFont({
14-
src: "./fonts/GeistMonoVF.woff",
15-
variable: "--font-geist-mono",
16-
weight: "100 900",
8+
const robotoSlab = Roboto_Slab({
9+
weight: ["100", "300", "400", "500", "700", "900"],
10+
subsets: ["latin"],
11+
display: "swap",
12+
variable: "--font-roboto-slab",
1713
});
1814

1915
export const viewport: Viewport = {
@@ -24,6 +20,7 @@ export const viewport: Viewport = {
2420
};
2521

2622
export const metadata: Metadata = {
23+
metadataBase: new URL(CLIENT.host),
2724
title: CLIENT.title,
2825
description: CLIENT.description,
2926
robots: "index, follow",
@@ -33,7 +30,6 @@ export const metadata: Metadata = {
3330
openGraph: {
3431
images: `${CLIENT.host}/og-image.png`,
3532
type: "website",
36-
url: "https://shield.rs",
3733
locale: "en_US",
3834
siteName: CLIENT.name,
3935
title: CLIENT.title,
@@ -60,7 +56,7 @@ export default function RootLayout({
6056
<meta charSet="utf-8" />
6157
</head>
6258
<body
63-
className={`${geistSans.variable} ${geistMono.variable} flex flex-col min-h-svh antialiased bg-background-base overflow-x-hidden`}
59+
className={`${robotoSlab.variable} flex flex-col min-h-svh antialiased bg-background-base overflow-x-hidden`}
6460
>
6561
<ThemeProvider
6662
attribute="class"

src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Home() {
1818
return (
1919
<div className="relative">
2020
<div className="absolute -z-10 aspect-auto w-full flex justify-center xl:-top-40 antialiased">
21-
<Image src={ellipse} alt="ellipse" className="w-full" />
21+
<Image priority src={ellipse} alt="ellipse" className="w-full" />
2222
</div>
2323
<main className="container text-center">
2424
<section className="flex flex-col w-full items-center justify-center py-16 lg:py-36 gap-10">

src/components/icons/logo.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import Image from "next/image";
22
import logo from "~/components/assets/logo.svg";
33

44
const Logo = () => {
5-
return <Image src={logo} alt="shield logo" className="w-full aspect-auto" />;
5+
return (
6+
<Image
7+
priority
8+
src={logo}
9+
alt="shield logo"
10+
className="w-full aspect-auto"
11+
/>
12+
);
613
};
714

815
export default Logo;

tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const config: Config = {
1818
},
1919
extend: {
2020
fontFamily: {
21-
"roboto-slab": ["Roboto Slab", "serif"],
21+
"roboto-slab": "var(--font-roboto-slab)",
2222
},
2323
minHeight: {
2424
screenLessNav: "calc(100dvh - 60px)",

0 commit comments

Comments
 (0)