Skip to content

Commit 6b2af1d

Browse files
feat: storybook azion deploy
1 parent 4a4060b commit 6b2af1d

4 files changed

Lines changed: 215 additions & 3 deletions

File tree

apps/storybook/azion.config.mjs

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/**
2+
* This file was automatically generated based on your preset configuration.
3+
*
4+
* For better type checking and IntelliSense:
5+
* 1. Install azion as dev dependency:
6+
* npm install -D azion
7+
*
8+
* 2. Use defineConfig:
9+
* import { defineConfig } from 'azion'
10+
*
11+
* 3. Replace the configuration with defineConfig:
12+
* export default defineConfig({
13+
* // Your configuration here
14+
* })
15+
*
16+
* For more configuration options, visit:
17+
* https://github.com/aziontech/lib/tree/main/packages/config
18+
*/
19+
20+
export default {
21+
build: {
22+
preset: 'vue',
23+
polyfills: true
24+
},
25+
storage: [
26+
{
27+
name: 'webkit-storybook',
28+
prefix: '20260316141821',
29+
dir: './dist',
30+
workloadsAccess: 'read_only'
31+
}
32+
],
33+
connectors: [
34+
{
35+
name: 'webkit-storybook',
36+
active: true,
37+
type: 'storage',
38+
attributes: {
39+
bucket: 'webkit-storybook',
40+
prefix: '20260316141821'
41+
}
42+
}
43+
],
44+
applications: [
45+
{
46+
name: 'webkit-storybook',
47+
cache: [
48+
{
49+
name: 'webkit-storybook',
50+
browser: {
51+
maxAgeSeconds: 7200
52+
},
53+
edge: {
54+
maxAgeSeconds: 7200
55+
}
56+
}
57+
],
58+
rules: {
59+
request: [
60+
{
61+
name: 'Deliver Static Assets and Set Cache Policy',
62+
description:
63+
'Deliver static assets directly from storage and set cache policy',
64+
active: true,
65+
criteria: [
66+
[
67+
{
68+
variable: '${uri}',
69+
conditional: 'if',
70+
operator: 'matches',
71+
argument:
72+
'\.(jpg|jpeg|png|gif|bmp|webp|svg|ico|ttf|otf|woff|woff2|eot|pdf|doc|docx|xls|xlsx|ppt|pptx|mp4|webm|mp3|wav|ogg|css|js|json|xml|html|txt|csv|zip|rar|7z|tar|gz|webmanifest|map|md|yaml|yml)$'
73+
}
74+
]
75+
],
76+
behaviors: [
77+
{
78+
type: 'set_connector',
79+
attributes: {
80+
value: 'webkit-storybook'
81+
}
82+
},
83+
{
84+
type: 'set_cache_policy',
85+
attributes: {
86+
value: 'webkit-storybook'
87+
}
88+
},
89+
{
90+
type: 'deliver'
91+
}
92+
]
93+
},
94+
{
95+
name: 'Redirect to index.html',
96+
description:
97+
'Handle all routes by rewriting to index.html for client-side routing',
98+
active: true,
99+
criteria: [
100+
[
101+
{
102+
variable: '${uri}',
103+
conditional: 'if',
104+
operator: 'matches',
105+
argument: '^\/'
106+
}
107+
]
108+
],
109+
behaviors: [
110+
{
111+
type: 'set_connector',
112+
attributes: {
113+
value: 'webkit-storybook'
114+
}
115+
},
116+
{
117+
type: 'rewrite_request',
118+
attributes: {
119+
value: '/index.html'
120+
}
121+
}
122+
]
123+
}
124+
],
125+
response: []
126+
}
127+
}
128+
],
129+
workloads: [
130+
{
131+
name: 'webkit-storybook',
132+
active: true,
133+
infrastructure: 1,
134+
deployments: [
135+
{
136+
name: 'webkit-storybook',
137+
current: true,
138+
active: true,
139+
strategy: {
140+
type: 'default',
141+
attributes: {
142+
application: 'webkit-storybook'
143+
}
144+
}
145+
}
146+
]
147+
}
148+
]
149+
}

apps/storybook/azion/args.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

apps/storybook/azion/azion.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "webkit-storybook",
3+
"bucket": "webkit-storybook",
4+
"preset": "html",
5+
"env": "production",
6+
"prefix": "20260316141821",
7+
"rotate-prefix": true,
8+
"not-first-run": true,
9+
"function": [],
10+
"application": {
11+
"id": 1773684562,
12+
"name": "webkit-storybook"
13+
},
14+
"domain": {
15+
"id": 0,
16+
"name": "__DEFAULT__",
17+
"domain_name": "",
18+
"url": ""
19+
},
20+
"rt-purge": {
21+
"purge_on_publish": true
22+
},
23+
"origin": null,
24+
"rules-engine": {
25+
"created": false,
26+
"rules": [
27+
{
28+
"id": 524999,
29+
"name": "Deliver Static Assets and Set Cache Policy",
30+
"phase": "request"
31+
},
32+
{
33+
"id": 525000,
34+
"name": "Redirect to index.html",
35+
"phase": "request"
36+
}
37+
]
38+
},
39+
"cache-settings": [
40+
{
41+
"id": 274966,
42+
"name": "webkit-storybook"
43+
}
44+
],
45+
"workloads": {
46+
"id": 1773688858,
47+
"name": "webkit-storybook",
48+
"domains": [],
49+
"url": "https://iiirmefzrt4.map.azionedge.net",
50+
"deployment_id": [
51+
{
52+
"id": 186821,
53+
"name": "webkit-storybook"
54+
}
55+
]
56+
},
57+
"connectors": [
58+
{
59+
"id": 10418,
60+
"name": "webkit-storybook"
61+
}
62+
]
63+
}

apps/storybook/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
2-
"name": "storybook",
2+
"name": "webkit-storybook",
33
"version": "0.1.0",
44
"private": true,
55
"description": "Storybook documentation for @aziontech/webkit component library",
66
"license": "MIT",
77
"type": "module",
88
"scripts": {
99
"dev": "storybook dev -p 6006",
10-
"build": "storybook build",
11-
"build:static": "storybook build -o dist",
10+
"build": "storybook build -o dist",
1211
"preview": "npx http-server dist -p 6007"
1312
},
1413
"dependencies": {

0 commit comments

Comments
 (0)