From ab33c5c8d1a1e3e64a00aee7a507d92b82da3119 Mon Sep 17 00:00:00 2001 From: Mumtahin Farabi Date: Sun, 1 Dec 2024 16:38:50 -0500 Subject: [PATCH] ci(build): fix pipeline failing due to unspecified base and head --- .github/workflows/BUILD.yml | 9 - apps/docs/app/(docs)/layout.tsx | 2 +- apps/docs/index.d.ts | 5 + apps/docs/netlify.toml | 5 +- apps/docs/next.config.mjs | 57 +- apps/website/app/nx-welcome.tsx | 874 ++++++++++++++++++ apps/website/app/root.tsx | 20 +- apps/website/app/routes/_test.tsx | 9 + apps/website/netlify.toml | 4 +- .../{_index.spec.tsx => _test.spec.tsx} | 2 +- apps/website/tsconfig.json | 3 - apps/website/vite.config.ts | 4 +- apps/website/vitest.config.ts | 11 +- .../ui/mission/mission.section.tsx | 9 +- .../ui/mission/spline-mission.client.tsx | 14 - .../ui/mission/spline-mission.tsx | 16 + .../ui/welcome/spline-welcome.client.tsx | 11 - .../ui/welcome/spline-welcome.tsx | 14 + .../ui/welcome/welcome.section.tsx | 9 +- nx.json | 1 - tsconfig.base.json | 8 +- vitest.workspace.ts | 2 +- 22 files changed, 995 insertions(+), 94 deletions(-) create mode 100644 apps/docs/index.d.ts create mode 100644 apps/website/app/nx-welcome.tsx create mode 100644 apps/website/app/routes/_test.tsx rename apps/website/tests/routes/{_index.spec.tsx => _test.spec.tsx} (88%) delete mode 100644 libs/website/feature/introduction/ui/mission/spline-mission.client.tsx create mode 100644 libs/website/feature/introduction/ui/mission/spline-mission.tsx delete mode 100644 libs/website/feature/introduction/ui/welcome/spline-welcome.client.tsx create mode 100644 libs/website/feature/introduction/ui/welcome/spline-welcome.tsx diff --git a/.github/workflows/BUILD.yml b/.github/workflows/BUILD.yml index 1555b8cb..82cd5e5e 100644 --- a/.github/workflows/BUILD.yml +++ b/.github/workflows/BUILD.yml @@ -22,9 +22,6 @@ jobs: - name: Fetch main branch run: git fetch origin main:main # Explicitly fetch the 'main' branch to ensure it's available - - name: List all branches - run: git branch -a # Debugging step to list all branches fetched in the runner - - name: ๐Ÿ“ฆ Install pnpm uses: pnpm/action-setup@v4 @@ -33,12 +30,6 @@ jobs: with: node-version: 20 - - name: Debug Git Status - run: | - git status # Show the current branch and changes - git branch -a # List all local and remote branches - git log -1 # Show the last commit for debug purposes - - name: ๐Ÿงน Lint Projects # TODO: Restore functionality after pipeline is fixed run: pnpm i; diff --git a/apps/docs/app/(docs)/layout.tsx b/apps/docs/app/(docs)/layout.tsx index d0a58ab8..fb4af800 100644 --- a/apps/docs/app/(docs)/layout.tsx +++ b/apps/docs/app/(docs)/layout.tsx @@ -1,9 +1,9 @@ import type { ReactNode } from 'react' /* import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle' */ +import { DocsLayout } from 'fumadocs-ui/layouts/notebook' import { source } from '../../source' /* https://fumadocs.vercel.app/docs/ui/blocks/layout#notebook */ /* import { DocsLayout } from 'fumadocs-ui/layouts/docs' */ -import { DocsLayout } from 'fumadocs-ui/layouts/notebook' import { baseOptions } from '../layout.config' import 'katex/dist/katex.css' diff --git a/apps/docs/index.d.ts b/apps/docs/index.d.ts new file mode 100644 index 00000000..d0326326 --- /dev/null +++ b/apps/docs/index.d.ts @@ -0,0 +1,5 @@ +declare module '*.svg' { + const content: any + export const ReactComponent: any + export default content +} diff --git a/apps/docs/netlify.toml b/apps/docs/netlify.toml index 6e9b13c3..67745f65 100644 --- a/apps/docs/netlify.toml +++ b/apps/docs/netlify.toml @@ -1,3 +1,6 @@ [build] -command = "pnpm nx build docs --prod --verbose" +command = "pnpm nx affected -t=build --exclude='*,!docs' --verbose" publish = "apps/docs/.next" + +[[plugins]] +package = "@netlify/plugin-nextjs" diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 8efaf562..43f5885d 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -1,4 +1,6 @@ -import { composePlugins, withNx } from '@nx/next' +// @ts-check + +// import { composePlugins, withNx } from '@nx/next' import { createMDX } from 'fumadocs-mdx/next' @@ -16,19 +18,31 @@ const defaultImageHostnames = [ 'res.cloudinary.com', ] -const nextConfig = { - nx: { - // Set this to true if you would like to use SVGR - // See: https://github.com/gregberge/svgr - svgr: false, - reactStrictMode: true, - typescript: { - // !! WARN !! - // Dangerously allow production builds to successfully complete even if - // your project has type errors. - // !! WARN !! - ignoreBuildErrors: true, - }, +/** + * @type {import('@nx/next/plugins/with-nx').WithNxOptions} + */ +// const nextConfig = { +// nx: { +// // Set this to true if you would like to use SVGR +// // See: https://github.com/gregberge/svgr +// svgr: false, +// }, +// } + +/** @type {import('next').NextConfig} */ +const config = { + reactStrictMode: true, + typescript: { + // !! WARN !! + // Dangerously allow production builds to successfully complete even if + // your project has type errors. + // !! WARN !! + ignoreBuildErrors: true, + }, + eslint: { + // Warning: This allows production builds to successfully complete even if + // your project has ESLint errors. + ignoreDuringBuilds: true, }, output: 'standalone', images: { @@ -42,10 +56,13 @@ const nextConfig = { const withMDX = createMDX({}) -const plugins = [ - // Add more Next.js plugins to this list if needed. - withNx, - withMDX, -] +// const plugins = [ +// // Add more Next.js plugins to this list if needed. +// withNx, +// withMDX, +// ] + +// export default composePlugins(...plugins)(nextConfig) -export default composePlugins(...plugins)(nextConfig) +export default withMDX(config) +// export default withMDX(nextConfig); diff --git a/apps/website/app/nx-welcome.tsx b/apps/website/app/nx-welcome.tsx new file mode 100644 index 00000000..78c0fd4d --- /dev/null +++ b/apps/website/app/nx-welcome.tsx @@ -0,0 +1,874 @@ +/* + * * * * * * * * * * * * * * * * * * * * * * * * * * * * + This is a starter component and can be deleted. + * * * * * * * * * * * * * * * * * * * * * * * * * * * * + Delete this file and get started with your project! + * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ +export function NxWelcome({ title }: { title: string }) { + return ( + <> +