Repository navigation
92 lines (78 loc) · 2.15 KB
/
Copy pathpages.yml
File metadata and controls
92 lines (78 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Deploy demo to GitHub Pages
on:
push:
branches: [main]
paths:
- 'src/**'
- 'tokens/**'
- 'demo-app/**'
- 'patches/**'
- 'mitosis.config.js'
- 'scripts/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build demo
runs-on: ubuntu-latest
steps:
- name: Checkout @bitcode/ui
uses: actions/checkout@v4
with:
path: ui
# @bitcode/ui declares `@bitcode/ui-schema: file:../ui-schema`, so the
# schema repo must sit as a sibling of the ui checkout — the same layout
# used in the BitCode monorepo (packages/ui next to packages/ui-schema).
- name: Checkout @bitcode/ui-schema as sibling
uses: actions/checkout@v4
with:
repository: bitcode-framework/ui-schema
path: ui-schema
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: |
ui/package-lock.json
ui/demo-app/package-lock.json
- name: Configure Pages
id: pages
uses: actions/configure-pages@v5
- name: Install library dependencies
working-directory: ui
run: npm ci
- name: Build Mitosis output
working-directory: ui
run: npm run build
- name: Install demo dependencies
working-directory: ui/demo-app
run: npm ci
- name: Build demo
working-directory: ui/demo-app
env:
DEMO_BASE: ${{ steps.pages.outputs.base_path }}/
run: npm run build
- name: Disable Jekyll processing
run: touch ui/demo-app/dist/.nojekyll
- uses: actions/upload-pages-artifact@v3
with:
path: ui/demo-app/dist
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4