Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup project #2

Merged
merged 13 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
29 changes: 29 additions & 0 deletions .github/workflows/check-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Deploy Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
check-build:
name: Check Website build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: npm

- name: Install Dependencies
run: npm ci --legacy-peer-deps

- name: Test Build Next.js Project
run: npm run build
61 changes: 61 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
name: Deploy GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: npm
cache-dependency-path: package-lock.json

- name: Install Dependencies
run: npm ci --legacy-peer-deps

- name: Build Next.js Project
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: out # Updated to root-level 'out' directory

Check warning on line 49 in .github/workflows/deploy-gh-pages.yml

View workflow job for this annotation

GitHub Actions / Run yamllint

49:21 [comments] too few spaces before comment

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Binary file added app/favicon.ico
Binary file not shown.
Binary file added app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file added app/fonts/GeistVF.woff
Binary file not shown.
21 changes: 21 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--background: #ffffff;
--foreground: #171717;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}
35 changes: 35 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { Metadata } from "next"
import localFont from "next/font/local"
import "./globals.css"

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
})
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
})

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
}

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
)
}
Loading