Skip to content

Commit

Permalink
setup deployment with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
sebald committed Feb 16, 2024
1 parent b056259 commit 56487a3
Show file tree
Hide file tree
Showing 4 changed files with 543 additions and 10 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy
on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
branches: ["main"]

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

# Allow one concurrent deployment
concurrency:
group: 'pages'
group: "pages"
cancel-in-progress: true

jobs:
Expand All @@ -30,22 +30,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache: "npm"
- name: Install dependencies
run: npm install
run: pnpm install
- name: Build
run: npm run build
run: pnpm build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload dist repository
path: './dist'
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 4 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { MarigoldProvider } from "@marigold/components";
import theme from "@marigold/theme-b2b";

import Slides from "./slideshow.mdx";
import Validation from "./validation.mdx";
import { Example } from "./example";
import { Frame } from "./Frame";

Expand All @@ -18,6 +19,9 @@ const App = () => (
</MarigoldProvider>
</Frame>
</div>
<div className="content-item">
<Validation />
</div>
</div>
);

Expand Down
13 changes: 9 additions & 4 deletions src/example.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Form, Stack, TextField } from "@marigold/components";
import { Button, Form, Inline, Stack, TextField } from "@marigold/components";
import { getFormData, post } from "./utils";

interface User {
Expand All @@ -23,9 +23,14 @@ export const Example = () => {
<Stack space={4} alignX="left">
<TextField label="Name" name="name" required />
<TextField type="email" label="E-Mail" name="email" required />
<Button variant="primary" type="submit">
Submit
</Button>
<Inline space={2}>
<Button variant="primary" type="submit">
Submit
</Button>
<Button variant="secondary" type="reset">
Reset
</Button>
</Inline>
</Stack>
</Form>
);
Expand Down
Loading

0 comments on commit 56487a3

Please sign in to comment.