Skip to content

Commit 9eb1d84

Browse files
committed
Ajout du workflow Github Action CI et la modification du fichier readme.md
1 parent a70815a commit 9eb1d84

4 files changed

Lines changed: 42 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint-and-build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: npm
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Lint
29+
run: npm run lint
30+
31+
- name: Build
32+
run: npm run build

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
![TypeScript](https://img.shields.io/badge/TypeScript-blue?style=flat-square&logo=typescript&logoColor=white)
55
![Tailwind CSS](https://img.shields.io/badge/Tailwind-v4-38bdf8?style=flat-square&logo=tailwindcss&logoColor=white)
66
![Vercel](https://img.shields.io/badge/Vercel-ready-black?style=flat-square&logo=vercel)
7+
[![CI](https://github.com/Lory578/devfolio/actions/workflows/ci.yml/badge.svg)](https://github.com/Lory578/devfolio/actions/workflows/ci.yml)
78
![License](https://img.shields.io/badge/licence-MIT-green?style=flat-square)
89

910
![DevFolio](public/devfolio-logo@2x.png)

app/[username]/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { notFound, redirect } from 'next/navigation'
22
import { Metadata } from 'next'
33
import { cookies } from 'next/headers'
4+
import Link from 'next/link'
45
import { getUser, getRepos, getLanguages } from '@/lib/github'
56
import ProfileCard from '@/components/ProfileCard'
67
import StatsGrid from '@/components/StatsGrid'
@@ -69,12 +70,12 @@ export default async function PortfolioPage({ params }: Props) {
6970
return (
7071
<main className="page-shell min-h-screen px-4 py-8 sm:px-6 sm:py-12">
7172
<div className="relative mx-auto max-w-6xl">
72-
<a href="/" className="mb-6 inline-flex items-center gap-1.5 text-xs text-(--ink-soft) transition-colors hover:text-(--ink)">
73+
<Link href="/" className="mb-6 inline-flex items-center gap-1.5 text-xs text-(--ink-soft) transition-colors hover:text-(--ink)">
7374
<svg className="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
7475
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
7576
</svg>
7677
{dict.profile.backHome}
77-
</a>
78+
</Link>
7879
<div className="grid gap-5 lg:grid-cols-[1.15fr_0.85fr] lg:items-start">
7980
<section className="soft-card rounded-md p-5 sm:p-8">
8081
<ProfileCard user={user} />

app/not-found.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ export default function NotFound() {
2424
const [locale, setLocale] = useState<'fr' | 'en'>('fr')
2525

2626
useEffect(() => {
27-
setLocale(readLocaleFromDocument())
28-
setMounted(true)
27+
const timer = window.setTimeout(() => {
28+
setLocale(readLocaleFromDocument())
29+
setMounted(true)
30+
}, 0)
31+
32+
return () => window.clearTimeout(timer)
2933
}, [])
3034

3135
const dict = useMemo(() => getDictionary(locale), [locale])

0 commit comments

Comments
 (0)