Skip to content

Commit 2875c6d

Browse files
committed
[fix] some Registry Deployment bugs (fix #2)
1 parent 1bb20fc commit 2875c6d

File tree

11 files changed

+54
-191
lines changed

11 files changed

+54
-191
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_BASE_URL = https://mobx-restful-shadcn.idea2.app

.github/workflows/main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI & CD
2+
on:
3+
push:
4+
branches:
5+
- "**"
6+
jobs:
7+
Build-and-Deploy:
8+
env:
9+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
10+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
11+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
18+
19+
- name: Deploy to Vercel
20+
id: vercel-deployment
21+
uses: amondnet/vercel-action@v25
22+
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
23+
with:
24+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
27+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
28+
working-directory: ./
29+
vercel-args: ${{ github.ref == 'refs/heads/main' && ' --prod' || '' }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ yarn-error.log*
3131
.pnpm-debug.log*
3232

3333
# env files (can opt-in for committing if needed)
34-
.env*
34+
.env*.local
3535

3636
# vercel
3737
.vercel
@@ -41,5 +41,6 @@ yarn-error.log*
4141
next-env.d.ts
4242

4343
# Shadcn UI components
44+
public/r/
4445
components/.stash/
4546
components/ui/*

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# registry-template
1+
# MobX RESTful Shadcn
2+
3+
A **Pagination Table** & **Scroll List** component suite for [CRUD operation][1], which is based on [MobX RESTful][2] & [React][3].
24

35
You can use the `shadcn` CLI to run your own component registry. Running your own
46
component registry allows you to distribute your custom components, hooks, pages, and
@@ -21,3 +23,7 @@ This is a template for creating a custom registry using Next.js.
2123
## Documentation
2224

2325
Visit the [shadcn documentation](https://ui.shadcn.com/docs/registry) to view the full documentation.
26+
27+
[1]: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
28+
[2]: https://github.com/idea2app/MobX-RESTful
29+
[3]: https://reactjs.org/

app/layout.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import type { Metadata } from "next";
2+
23
import "./globals.css";
34

45
export const metadata: Metadata = {
5-
title: "Create Next App",
6-
description: "Generated by create next app",
6+
title: "MobX RESTful Shadcn",
7+
description:
8+
"A Pagination Table & Scroll List component suite for CRUD operation, which is based on MobX RESTful & React.",
79
};
810

911
export default function RootLayout({
@@ -15,15 +17,17 @@ export default function RootLayout({
1517
<html lang="en">
1618
<head>
1719
<link rel="preconnect" href="https://fonts.googleapis.com" />
18-
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
20+
<link
21+
rel="preconnect"
22+
href="https://fonts.gstatic.com"
23+
crossOrigin="anonymous"
24+
/>
1925
<link
2026
href="https://fonts.googleapis.com/css2?family=Geist+Sans:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600;700&display=swap"
2127
rel="stylesheet"
2228
/>
2329
</head>
24-
<body className="antialiased">
25-
{children}
26-
</body>
30+
<body className="antialiased">{children}</body>
2731
</html>
2832
);
2933
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "registry",
3-
"version": "0.1.0",
2+
"name": "mobx-restful-shadcn",
3+
"version": "0.6.0",
44
"private": true,
55
"scripts": {
66
"postinstall": "shadcn-helper install",
7+
"registry:build": "shadcn build",
78
"dev": "next dev --webpack",
8-
"build": "next build --webpack",
9-
"start": "next start",
10-
"registry:build": "shadcn build"
9+
"build": "npm run registry:build && next build --webpack",
10+
"start": "next start"
1111
},
1212
"dependencies": {
1313
"@radix-ui/react-dialog": "^1.1.15",

public/r/complex-component.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

public/r/example-form.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

public/r/example-with-css.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

public/r/hello-world.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)