Skip to content

Commit d49fb2f

Browse files
authored
Merge pull request #145 from episerver/bugfix/CMS-46399-small-bugs
Add action to build sample sites
2 parents 9021665 + beb77f1 commit d49fb2f

File tree

6 files changed

+24
-3
lines changed

6 files changed

+24
-3
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check Pull requests
2+
on: push
3+
jobs:
4+
Check-PullRequests:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: pnpm/action-setup@v2
9+
name: Install pnpm
10+
id: pnpm-install
11+
- name: Install dependencies
12+
run: pnpm install
13+
- name: Build packages
14+
run: pnpm --filter "./packages/**" build
15+
- name: Build sample sites
16+
run: pnpm --filter "./samples/**" build
17+
- name: Run tests
18+
run: pnpm --filter "./packages/**" test

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"private": "true",
1010
"scripts": {
1111
"build": "pnpm --filter \"./packages/**\" build",
12+
"build:samples": "pnpm --filter \"./samples/**\" build",
1213
"clean:all": "pnpm -r clean",
1314
"test": "echo \"Error: no test specified\" && exit 1",
1415
"publish:all": "pnpm --filter \"./packages/**\" publish --access public --no-git-checks"

samples/fx-integration/src/app/en/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Props = {
99
}>;
1010
};
1111

12-
function returnFirst(content: any[]) {
12+
function returnFirst<T>(content: T[]) {
1313
if (content.length === 0) {
1414
notFound();
1515
}

samples/fx-integration/src/app/registration/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { trackRegistration } from '@/lib/fx';
2+
import { connection } from 'next/server';
23

34
export default async function Page() {
5+
await connection();
46
await trackRegistration();
57

68
return <h1>Thanks for registration!</h1>;

samples/fx-integration/src/components/FxCallout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ type Props = {
2020
opti: Infer<typeof FxCalloutCT>;
2121
};
2222

23-
export default function FxCallout({ opti }: Props) {
23+
export default function FxCallout({}: Props) {
2424
return <></>;
2525
}

samples/graph-webhooks-cache-invalidation/src/app/preview/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
export default function Page() {
44
return (
55
<div>
6-
This sample site doesn't have Live Preview enabled. Go to{' '}
6+
This sample site doesn&apos;t have Live Preview enabled. Go to{' '}
77
<a href="/en/" target="_blank">
88
/en
99
</a>{' '}

0 commit comments

Comments
 (0)