Skip to content

Commit 0b07c94

Browse files
authored
Chore: Basic CICD (#24)
* Add basic CICD * Split lint fix from regular linting * Fix linting errors * Build Next types when doing typechecks
1 parent 95f9ffc commit 0b07c94

4 files changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
concurrency:
8+
group: ci-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
cache: yarn
20+
- run: yarn
21+
- run: yarn lint
22+
- run: yarn typecheck

components/gallery/ArticleCTA.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function ArticleCTA({ article }: { article: Article }) {
4141
type="button"
4242
onClick={() => setCollapsed(true)}
4343
aria-label="Hide new article"
44-
className="cursor-pointer pointer-events-auto grid h-6 w-6 shrink-0 place-items-center rounded-full text-[#777] transition-colors hover:bg-black/5 hover:text-[#111] sm:h-7 sm:w-7"
44+
className="pointer-events-auto grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded-full text-[#777] transition-colors hover:bg-black/5 hover:text-[#111] sm:h-7 sm:w-7"
4545
>
4646
<svg viewBox="0 0 10 10" aria-hidden className="h-2 w-2 sm:h-2.5 sm:w-2.5">
4747
<path d="M2 5H8" stroke="currentColor" strokeWidth="1.25" strokeLinecap="round" />

layouts/PostLayout.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function PostLayout({ content, authorDetails, next, prev, childre
7373
</dd>
7474
</div>
7575
</dl>
76-
<h1 className="max-w-4xl text-pretty text-4xl leading-[1] font-semibold tracking-tight text-gray-950 sm:text-5xl md:text-6xl dark:text-gray-50">
76+
<h1 className="max-w-4xl text-4xl leading-[1] font-semibold tracking-tight text-pretty text-gray-950 sm:text-5xl md:text-6xl dark:text-gray-50">
7777
{title}
7878
</h1>
7979
{byline && (
@@ -211,10 +211,7 @@ export default function PostLayout({ content, authorDetails, next, prev, childre
211211
</section>
212212
</footer>
213213
{siteMetadata.comments && (
214-
<div
215-
className="pt-10 text-center text-gray-700 dark:text-gray-300"
216-
id="comment"
217-
>
214+
<div className="pt-10 text-center text-gray-700 dark:text-gray-300" id="comment">
218215
<Comments slug={slug} />
219216
</div>
220217
)}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"build": "cross-env INIT_CWD=$PWD next build && cross-env NODE_OPTIONS='--experimental-json-modules' node ./scripts/postbuild.mjs",
99
"serve": "next start",
1010
"analyze": "cross-env ANALYZE=true next build",
11-
"lint": "next lint --fix --dir pages --dir app --dir components --dir lib --dir layouts --dir scripts",
11+
"lint": "next lint --dir pages --dir app --dir components --dir lib --dir layouts --dir scripts",
12+
"lint:fix": "next lint --fix --dir pages --dir app --dir components --dir lib --dir layouts --dir scripts",
13+
"typecheck": "contentlayer2 build && tsc --noEmit",
1214
"prepare": "husky"
1315
},
1416
"dependencies": {

0 commit comments

Comments
 (0)