Skip to content

Commit

Permalink
Initial project setup (#2)
Browse files Browse the repository at this point in the history
* setup project

* deploy website to github pages

* fix deploy

* fix deploy

* check deploy

* fix deploy

* fix

* fix lint

* moved to root folder

* moved to root folder

* fix deploy

* fix deploy

* Update .github/workflows/deploy-gh-pages.yml

---------

Co-authored-by: Daniel Mohns <[email protected]>
  • Loading branch information
munyanezaarmel and dmohns authored Nov 13, 2024
1 parent 9db6083 commit 01f9343
Show file tree
Hide file tree
Showing 21 changed files with 7,621 additions and 0 deletions.
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

0 comments on commit 01f9343

Please sign in to comment.