Skip to content

Commit 5b12f9c

Browse files
committed
chore: Revise README to remove cluttered component categories and enhance GitHub Actions workflows by restructuring jobs for building, linting, type checking, and testing, including new steps for example applications and release management.
1 parent 7b9038d commit 5b12f9c

File tree

2 files changed

+201
-79
lines changed

2 files changed

+201
-79
lines changed

.github/workflows/changesets.yml

Lines changed: 201 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ permissions:
1313
id-token: write
1414

1515
jobs:
16-
release:
17-
name: Release
16+
build:
17+
name: Build Library
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
@@ -30,29 +30,175 @@ jobs:
3030
with:
3131
node-version: 20
3232
cache: "pnpm"
33-
registry-url: "https://registry.npmjs.org"
3433

3534
- name: Install dependencies
3635
run: pnpm install --frozen-lockfile
3736

38-
- name: Build package
37+
- name: Build library
3938
run: pnpm build
4039

40+
- name: Upload build artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: dist
44+
path: dist
45+
retention-days: 1
46+
47+
lint:
48+
name: Lint Library
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
54+
- name: Setup pnpm
55+
uses: pnpm/action-setup@v4
56+
with:
57+
version: 9
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 20
63+
cache: "pnpm"
64+
65+
- name: Install dependencies
66+
run: pnpm install --frozen-lockfile
67+
68+
- name: Run ESLint
69+
run: pnpm lint
70+
71+
typecheck:
72+
name: Type Check Library
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Setup pnpm
79+
uses: pnpm/action-setup@v4
80+
with:
81+
version: 9
82+
83+
- name: Setup Node.js
84+
uses: actions/setup-node@v4
85+
with:
86+
node-version: 20
87+
cache: "pnpm"
88+
89+
- name: Install dependencies
90+
run: pnpm install --frozen-lockfile
91+
4192
- name: Run TypeScript type checking
4293
run: pnpm typecheck
4394

44-
- name: Run linting
45-
run: pnpm lint
95+
unit-tests:
96+
name: Unit Tests
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Checkout code
100+
uses: actions/checkout@v4
101+
102+
- name: Setup pnpm
103+
uses: pnpm/action-setup@v4
104+
with:
105+
version: 9
106+
107+
- name: Setup Node.js
108+
uses: actions/setup-node@v4
109+
with:
110+
node-version: 20
111+
cache: "pnpm"
112+
113+
- name: Install dependencies
114+
run: pnpm install --frozen-lockfile
46115

47116
- name: Run unit tests
48117
run: pnpm test:unit
49118

119+
example-lint:
120+
name: Lint Example App
121+
runs-on: ubuntu-latest
122+
steps:
123+
- name: Checkout code
124+
uses: actions/checkout@v4
125+
126+
- name: Setup pnpm
127+
uses: pnpm/action-setup@v4
128+
with:
129+
version: 9
130+
131+
- name: Setup Node.js
132+
uses: actions/setup-node@v4
133+
with:
134+
node-version: 20
135+
cache: "pnpm"
136+
137+
- name: Install dependencies
138+
run: pnpm install --frozen-lockfile
139+
50140
- name: Lint example app
51141
run: pnpm example:lint
52142

143+
example-typecheck:
144+
name: Type Check Example App
145+
runs-on: ubuntu-latest
146+
needs: build
147+
steps:
148+
- name: Checkout code
149+
uses: actions/checkout@v4
150+
151+
- name: Setup pnpm
152+
uses: pnpm/action-setup@v4
153+
with:
154+
version: 9
155+
156+
- name: Setup Node.js
157+
uses: actions/setup-node@v4
158+
with:
159+
node-version: 20
160+
cache: "pnpm"
161+
162+
- name: Install dependencies
163+
run: pnpm install --frozen-lockfile
164+
165+
- name: Download build artifacts
166+
uses: actions/download-artifact@v4
167+
with:
168+
name: dist
169+
path: dist
170+
53171
- name: Type check example app
54172
run: pnpm example:typecheck
55173

174+
e2e-tests:
175+
name: E2E Tests
176+
runs-on: ubuntu-latest
177+
needs: build
178+
steps:
179+
- name: Checkout code
180+
uses: actions/checkout@v4
181+
182+
- name: Setup pnpm
183+
uses: pnpm/action-setup@v4
184+
with:
185+
version: 9
186+
187+
- name: Setup Node.js
188+
uses: actions/setup-node@v4
189+
with:
190+
node-version: 20
191+
cache: "pnpm"
192+
193+
- name: Install dependencies
194+
run: pnpm install --frozen-lockfile
195+
196+
- name: Download build artifacts
197+
uses: actions/download-artifact@v4
198+
with:
199+
name: dist
200+
path: dist
201+
56202
- name: Build example app
57203
run: pnpm example:build
58204

@@ -64,6 +210,47 @@ jobs:
64210
env:
65211
CI: true
66212

213+
release:
214+
name: Create Release PR or Publish
215+
runs-on: ubuntu-latest
216+
needs:
217+
[
218+
build,
219+
lint,
220+
typecheck,
221+
unit-tests,
222+
example-lint,
223+
example-typecheck,
224+
e2e-tests,
225+
]
226+
outputs:
227+
published: ${{ steps.changesets.outputs.published }}
228+
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
229+
steps:
230+
- name: Checkout code
231+
uses: actions/checkout@v4
232+
233+
- name: Setup pnpm
234+
uses: pnpm/action-setup@v4
235+
with:
236+
version: 9
237+
238+
- name: Setup Node.js
239+
uses: actions/setup-node@v4
240+
with:
241+
node-version: 20
242+
cache: "pnpm"
243+
registry-url: "https://registry.npmjs.org"
244+
245+
- name: Install dependencies
246+
run: pnpm install --frozen-lockfile
247+
248+
- name: Download build artifacts
249+
uses: actions/download-artifact@v4
250+
with:
251+
name: dist
252+
path: dist
253+
67254
- name: Create Release Pull Request or Publish
68255
id: changesets
69256
uses: changesets/action@v1
@@ -77,8 +264,13 @@ jobs:
77264
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
78265
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79266

80-
- name: Post Release Actions
81-
if: steps.changesets.outputs.published == 'true'
267+
post-release:
268+
name: Post Release Actions
269+
runs-on: ubuntu-latest
270+
needs: release
271+
if: needs.release.outputs.published == 'true'
272+
steps:
273+
- name: Report Released Packages
82274
run: |
83275
echo "🎉 Released packages:"
84-
echo "${{ steps.changesets.outputs.publishedPackages }}"
276+
echo "${{ needs.release.outputs.publishedPackages }}"

README.md

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -95,73 +95,6 @@ Coffee fuels coding ☕️
9595

9696
<a href="https://www.buymeacoffee.com/garmeeh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
9797

98-
## 📦 Components by Category
99-
100-
### Articles & Content
101-
102-
- [ArticleJsonLd](#articlejsonld) - Articles, blog posts, news articles
103-
- [CreativeWorkJsonLd](#creativeworkjsonld) - Creative content with paywall support
104-
- [ClaimReviewJsonLd](#claimreviewjsonld) - Fact-checking articles
105-
106-
### Commerce & Products
107-
108-
- [ProductJsonLd](#productjsonld) - Product listings with offers and reviews
109-
- [ProductGroup](#productgroup-product-variants) - Product variants (sizes, colors)
110-
- [MerchantReturnPolicyJsonLd](#merchantreturnpolicyjsonld) - Return policies
111-
- [OrganizationJsonLd](#organizationjsonld) - Organization/company information
112-
113-
### Local Business
114-
115-
- [LocalBusinessJsonLd](#localbusinessjsonld) - Local business information
116-
- [RecipeJsonLd](#recipejsonld) - Recipe structured data
117-
118-
### Media & Entertainment
119-
120-
- [MovieCarouselJsonLd](#moviecarouseljsonld) - Movie carousels
121-
- [VideoJsonLd](#videojsonld) - Video content with key moments
122-
- [ImageJsonLd](#imagejsonld) - Image metadata
123-
124-
### Education & FAQ
125-
126-
- [CourseJsonLd](#coursejsonld) - Course listings
127-
- [FAQJsonLd](#faqjsonld) - Frequently asked questions
128-
- [QuizJsonLd](#quizjsonld) - Quiz and practice problems
129-
130-
### Reviews & Ratings
131-
132-
- [ReviewJsonLd](#reviewjsonld) - Individual reviews
133-
- [AggregateRatingJsonLd](#aggregateratingjsonld) - Aggregate ratings
134-
135-
### Navigation & Structure
136-
137-
- [BreadcrumbJsonLd](#breadcrumbjsonld) - Site navigation breadcrumbs
138-
- [CarouselJsonLd](#carouseljsonld) - Content carousels
139-
140-
### Events & Activities
141-
142-
- [EventJsonLd](#eventjsonld) - Events with location and ticket info
143-
144-
### Employment
145-
146-
- [JobPostingJsonLd](#jobpostingjsonld) - Job listings
147-
- [EmployerAggregateRatingJsonLd](#employeraggregateratingjsonld) - Employer ratings
148-
149-
### Real Estate
150-
151-
- [VacationRentalJsonLd](#vacationrentaljsonld) - Vacation rental properties
152-
153-
### Software & Apps
154-
155-
- [SoftwareApplicationJsonLd](#softwareapplicationjsonld) - Software and mobile apps
156-
157-
### Other
158-
159-
- [DatasetJsonLd](#datasetjsonld) - Research datasets
160-
- [DiscussionForumPostingJsonLd](#discussionforumpostingjsonld) - Forum posts
161-
- [ProfilePageJsonLd](#profilepagejsonld) - Profile pages
162-
163-
---
164-
16598
## Components
16699

167100
### ArticleJsonLd
@@ -1999,20 +1932,17 @@ import { CarouselJsonLd } from "next-seo";
19991932
#### Best Practices
20001933

20011934
1. **Choose the right pattern**:
2002-
20031935
- Use **summary page pattern** when you have separate detail pages for each item
20041936
- Use **all-in-one pattern** when all content is on a single page
20051937

20061938
2. **Consistent content types**: All items in a carousel must be of the same type (e.g., all recipes or all movies)
20071939

20081940
3. **Required images**:
2009-
20101941
- Movies require at least one image
20111942
- Recipes should include images for better visibility
20121943
- Use multiple aspect ratios when possible
20131944

20141945
4. **Position numbering**:
2015-
20161946
- Positions start at 1, not 0
20171947
- If not specified, positions are auto-assigned sequentially
20181948

0 commit comments

Comments
 (0)