Skip to content

Commit 56487a3

Browse files
committed
setup deployment with pnpm
1 parent b056259 commit 56487a3

File tree

4 files changed

+543
-10
lines changed

4 files changed

+543
-10
lines changed

.github/workflows/deploy.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ['main']
7+
branches: ["main"]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -17,7 +17,7 @@ permissions:
1717

1818
# Allow one concurrent deployment
1919
concurrency:
20-
group: 'pages'
20+
group: "pages"
2121
cancel-in-progress: true
2222

2323
jobs:
@@ -30,22 +30,25 @@ jobs:
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@v4
33+
- uses: pnpm/action-setup@v2
34+
with:
35+
version: 8
3336
- name: Set up Node
3437
uses: actions/setup-node@v3
3538
with:
3639
node-version: 18
37-
cache: 'npm'
40+
cache: "npm"
3841
- name: Install dependencies
39-
run: npm install
42+
run: pnpm install
4043
- name: Build
41-
run: npm run build
44+
run: pnpm build
4245
- name: Setup Pages
4346
uses: actions/configure-pages@v3
4447
- name: Upload artifact
4548
uses: actions/upload-pages-artifact@v2
4649
with:
4750
# Upload dist repository
48-
path: './dist'
51+
path: "./dist"
4952
- name: Deploy to GitHub Pages
5053
id: deployment
5154
uses: actions/deploy-pages@v2

src/App.jsx

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { MarigoldProvider } from "@marigold/components";
33
import theme from "@marigold/theme-b2b";
44

55
import Slides from "./slideshow.mdx";
6+
import Validation from "./validation.mdx";
67
import { Example } from "./example";
78
import { Frame } from "./Frame";
89

@@ -18,6 +19,9 @@ const App = () => (
1819
</MarigoldProvider>
1920
</Frame>
2021
</div>
22+
<div className="content-item">
23+
<Validation />
24+
</div>
2125
</div>
2226
);
2327

src/example.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Form, Stack, TextField } from "@marigold/components";
1+
import { Button, Form, Inline, Stack, TextField } from "@marigold/components";
22
import { getFormData, post } from "./utils";
33

44
interface User {
@@ -23,9 +23,14 @@ export const Example = () => {
2323
<Stack space={4} alignX="left">
2424
<TextField label="Name" name="name" required />
2525
<TextField type="email" label="E-Mail" name="email" required />
26-
<Button variant="primary" type="submit">
27-
Submit
28-
</Button>
26+
<Inline space={2}>
27+
<Button variant="primary" type="submit">
28+
Submit
29+
</Button>
30+
<Button variant="secondary" type="reset">
31+
Reset
32+
</Button>
33+
</Inline>
2934
</Stack>
3035
</Form>
3136
);

0 commit comments

Comments
 (0)