-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert: Build ui image locally in docker compose (#190)
* fix: atob error (maybe) * ci: Add workflow to test pnpm build * chore: Rename tests workflow to test-python * ignore frontend changes in python tests * missing env vars in pnpm build step * Attempt: change NEXT_SERVER_API_URL to localhost * refactor(ui): Use custom hook to fetch workflows * refactor(ui): Use custom hook to fetch playbooks * refactor(ui): Move common skeletions into component module * build: Build UI locally * build: Make changes according to vercel nextjs officiel docker image --------- Co-authored-by: Daryl Lim <[email protected]>
- Loading branch information
1 parent
5090afb
commit 5c5855e
Showing
11 changed files
with
169 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Test pnpm build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "frontend/**" | ||
- ".github/workflows/test-pnpm-build.yml" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "frontend/**" | ||
- ".github/workflows/test-pnpm-build.yml" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "22" | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: "latest" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
working-directory: ./frontend | ||
|
||
- name: Build project | ||
env: | ||
NEXT_PUBLIC_API_URL: http://localhost:3000 | ||
NEXT_PUBLIC_APP_URL: http://localhost:3000 | ||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "secret-clerk-publishable-key" | ||
NEXT_PUBLIC_DISABLE_AUTH: "true" | ||
NEXT_SERVER_API_URL: http://localhost:8000 | ||
NODE_ENV: development | ||
run: pnpm build | ||
working-directory: ./frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React, { Suspense } from "react" | ||
|
||
import { CenteredSpinner } from "@/components/loading/spinner" | ||
import { WorkflowsDashboard } from "@/components/playbooks/workflows-dashboard" | ||
import { PlaybooksDashboard } from "@/components/playbooks/workflows-dashboard" | ||
|
||
export default async function Page() { | ||
return ( | ||
<Suspense fallback={<CenteredSpinner />}> | ||
<WorkflowsDashboard /> | ||
<PlaybooksDashboard /> | ||
</Suspense> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Skeleton } from "@/components/ui/skeleton" | ||
|
||
export function ListItemSkeletion({ n = 2 }: { n: number }) { | ||
return ( | ||
<> | ||
{[...Array(n)].map((_i, idx) => ( | ||
<div | ||
key={idx} | ||
className="flex w-full items-center justify-center space-x-4" | ||
> | ||
<Skeleton className="size-12 rounded-full" /> | ||
<div className="space-y-2"> | ||
<Skeleton className="h-4 w-[250px]" /> | ||
<Skeleton className="h-4 w-[200px]" /> | ||
</div> | ||
</div> | ||
))} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.