Skip to content

Commit 3784771

Browse files
authored
Merge pull request #42 from atomly/chore/setup-github-actions
chore: github-actions
2 parents e64f88e + b3b01b5 commit 3784771

File tree

10 files changed

+112
-538
lines changed

10 files changed

+112
-538
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,35 @@ env:
1919
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
2020

2121
jobs:
22-
lint:
22+
check:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v4
2626

2727
- name: Setup
2828
uses: ./tooling/github/setup
2929

30-
- name: Copy env
31-
shell: bash
32-
run: cp .env.example .env
30+
- name: Check (lint and format)
31+
run: pnpm check
3332

34-
- name: Lint
35-
run: pnpm lint && pnpm lint:ws
36-
37-
format:
33+
typecheck:
3834
runs-on: ubuntu-latest
3935
steps:
4036
- uses: actions/checkout@v4
4137

4238
- name: Setup
4339
uses: ./tooling/github/setup
4440

45-
- name: Format
46-
run: pnpm format
41+
- name: Typecheck
42+
run: pnpm typecheck
4743

48-
typecheck:
44+
build:
4945
runs-on: ubuntu-latest
5046
steps:
5147
- uses: actions/checkout@v4
5248

5349
- name: Setup
5450
uses: ./tooling/github/setup
5551

56-
- name: Typecheck
57-
run: pnpm typecheck
52+
- name: Build
53+
run: pnpm build

apps/localtunnel/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"check": "biome check",
88
"clean": "git clean -xdf .cache .next .turbo node_modules tsconfig.tsbuildinfo",
9-
"dev": "pnpm with-env concurrently \"pnpm watch\" \"pnpm tunnel\"",
9+
"dev": "NODE_ENV=development pnpm with-env concurrently \"pnpm watch\" \"pnpm tunnel\"",
1010
"tunnel": "pnpm with-env sh -c 'pnpm lt --port $LOCALTUNNEL_PORT --subdomain $LOCALTUNNEL_SUBDOMAIN'",
1111
"typecheck": "tsc --noEmit",
1212
"watch": "pnpm with-env tsx watch ./src/main.ts",

apps/web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "pnpm with-env next build",
7+
"build": "NODE_ENV=production pnpm with-env next build",
88
"check": "biome check",
99
"clean": "git clean -xdf .cache .next .turbo node_modules",
10-
"dev": "pnpm with-env next dev --turbopack",
10+
"dev": "NODE_ENV=development pnpm with-env next dev --turbopack",
1111
"shadcn": "pnpm dlx shadcn@latest add && pnpm check --write --unsafe",
12-
"start": "pnpm with-env next start",
12+
"start": "NODE_ENV=production pnpm with-env next start",
1313
"typecheck": "tsc --noEmit",
1414
"with-env": "dotenv -e ../../.env --"
1515
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import dynamic from "next/dynamic";
2+
3+
export const DynamicNotFoundEditor = dynamic(
4+
() => import("./not-found-editor").then((mod) => mod.NotFoundEditor),
5+
{
6+
ssr: false,
7+
},
8+
);
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
"use client";
2+
3+
import { BlockNoteView } from "@blocknote/mantine";
4+
import { useCreateBlockNote } from "@blocknote/react";
5+
6+
export function NotFoundEditor() {
7+
// Creates a new editor instance.
8+
const editor = useCreateBlockNote({
9+
initialContent: [
10+
{
11+
content: "Journl #404",
12+
type: "heading",
13+
},
14+
{
15+
content: "Page not found.",
16+
type: "paragraph",
17+
},
18+
{
19+
content: "The path was linked, but the note was not.",
20+
type: "bulletListItem",
21+
},
22+
{
23+
content: "Will investigate later... or probably forget.",
24+
type: "bulletListItem",
25+
},
26+
{
27+
children: [
28+
{
29+
content: "window.location.href = '/';",
30+
props: { language: "json" },
31+
type: "codeBlock",
32+
},
33+
],
34+
content: "This should help users find their way back...",
35+
type: "bulletListItem",
36+
},
37+
{
38+
type: "paragraph",
39+
},
40+
],
41+
});
42+
43+
return <BlockNoteView autoFocus theme="light" editor={editor} />;
44+
}

0 commit comments

Comments
 (0)