-
Notifications
You must be signed in to change notification settings - Fork 8
88 lines (78 loc) · 2.66 KB
/
example-apps-ci.yml
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
name: Build Example Apps
on:
pull_request:
types: [opened, synchronize, reopened, "ready_for_review"]
push:
branches:
- main
concurrency:
group: CI-Example-Apps-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
jobs:
build-example-apps:
permissions:
contents: read
strategy:
matrix:
include:
- node-version: 20
example-app: wc-angular12
- node-version: 16
example-app: wc-nuxt2
- node-version: 20
example-app: wc-react17
- node-version: 20
example-app: wc-react18
- node-version: 20
example-app: wc-vue3
name: Build ${{matrix.example-app}} - Node ${{ matrix.node-version }}
uses: ./.github/workflows/install-build.yml
with:
os: ubuntu-latest
node-version: ${{ matrix.node-version }}
build-script: build:examples --filter=${{ matrix.example-app }}
secrets: inherit
deploy-example-apps:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
matrix:
include:
- node-version: 20
amplify-app-id: d3krjop5uu4oza
build-script: build:examples
dist-folder: ./apps/examples/wc-angular12/dist/wc-angular12
example-app: wc-angular12
# Using the generate:examples script for static hosting. SSR requires more investigation
- node-version: 16
amplify-app-id: d3puta7o12ynlf
build-script: generate:examples
dist-folder: ./apps/examples/wc-nuxt2/dist
example-app: wc-nuxt2
- node-version: 20
amplify-app-id: d2a3kuvjs3esad
build-script: build:examples
dist-folder: ./apps/examples/wc-react17/dist
example-app: wc-react17
- node-version: 20
amplify-app-id: d1zlc7g0rtfm9g
build-script: build:examples
dist-folder: ./apps/examples/wc-react18/dist
example-app: wc-react18
- node-version: 20
amplify-app-id: dtgmklfymp81v
build-script: build:examples
dist-folder: ./apps/examples/wc-vue3/dist
example-app: wc-vue3
name: Deploy ${{matrix.example-app}}
uses: ./.github/workflows/amplify-deploy.yml
with:
os: ubuntu-latest
node-version: ${{ matrix.node-version }}
amplify-app-id: ${{ matrix.amplify-app-id }}
package-name: ${{ matrix.example-app}}
package-dist-directory: ${{ matrix.dist-folder }}
bucket-name-main: 'pie-example-apps-main'
build-script: ${{ matrix.build-script }}
secrets: inherit