diff --git a/.github/workflows/check-deploy.yml b/.github/workflows/check-deploy.yml new file mode 100644 index 0000000..5765eb0 --- /dev/null +++ b/.github/workflows/check-deploy.yml @@ -0,0 +1,32 @@ +name: Check Deploy Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + check-build: + name: Check dsh-website build + runs-on: ubuntu-latest + defaults: + run: + working-directory: dsh-website + 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 + + - name: Test Build Next.js Project + run: npm run build diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml new file mode 100644 index 0000000..a2b63dd --- /dev/null +++ b/.github/workflows/deploy-gh-pages.yml @@ -0,0 +1,64 @@ +# 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 + defaults: + run: + working-directory: dsh-website + 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: dsh-website/package-lock.json + + - name: Install Dependencies + run: npm ci + + - name: Build Next.js Project + run: npm run build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: dsh-website/out + + # 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 diff --git a/dsh-website/app/layout.tsx b/dsh-website/app/layout.tsx index a36cde0..ea47df1 100644 --- a/dsh-website/app/layout.tsx +++ b/dsh-website/app/layout.tsx @@ -1,27 +1,27 @@ -import type { Metadata } from "next"; -import localFont from "next/font/local"; -import "./globals.css"; +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; + children: React.ReactNode }>) { return ( @@ -31,5 +31,5 @@ export default function RootLayout({ {children} - ); + ) } diff --git a/dsh-website/next.config.ts b/dsh-website/next.config.ts index e9ffa30..3b84f68 100644 --- a/dsh-website/next.config.ts +++ b/dsh-website/next.config.ts @@ -1,7 +1,7 @@ -import type { NextConfig } from "next"; +import type { NextConfig } from "next" const nextConfig: NextConfig = { /* config options here */ -}; +} -export default nextConfig; +export default nextConfig diff --git a/dsh-website/postcss.config.mjs b/dsh-website/postcss.config.mjs index 1a69fd2..0dc456a 100644 --- a/dsh-website/postcss.config.mjs +++ b/dsh-website/postcss.config.mjs @@ -3,6 +3,6 @@ const config = { plugins: { tailwindcss: {}, }, -}; +} -export default config; +export default config diff --git a/dsh-website/tailwind.config.ts b/dsh-website/tailwind.config.ts index 1362b88..7d2055c 100644 --- a/dsh-website/tailwind.config.ts +++ b/dsh-website/tailwind.config.ts @@ -1,4 +1,4 @@ -import type { Config } from "tailwindcss"; +import type { Config } from "tailwindcss" export default { content: [ @@ -15,4 +15,4 @@ export default { }, }, plugins: [], -} satisfies Config; +} satisfies Config