-
Notifications
You must be signed in to change notification settings - Fork 144
94 lines (88 loc) · 2.86 KB
/
setup_pwa_manual.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
89
90
91
92
93
94
name: SalesforceCommerceCloud/pwa-kit/setup_pwa_manual
on:
workflow_dispatch:
inputs:
use_extensibility:
type: boolean
description: Use Extensibility?
default: true
project_id:
type: string
description: Project ID/Name
default: "scaffold-pwa"
instance_url:
type: string
description: Instance Url
org_id:
type: string
description: Org Id
short_code:
type: string
description: Short Code
client_id:
type: string
description: Client Id
site_id:
type: string
description: Site Id
mrt_target_id:
type: string
description: MRT Target ID/Name
is_private_client:
type: boolean
description: Is Private Client?
setup_hybrid:
type: boolean
description: Setup Phased Headless rollout?
default: false
jobs:
setup-pwa-kit:
runs-on: ubuntu-latest
steps:
- name: Initialize
id: initialize
run: |
set -e
echo "PROJECT_DIR=my-retail-react-app" >> $GITHUB_ENV
- name: Checkout
id: checkout
uses: actions/checkout@v3
- name: Setup node
id: setup_node
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- name: Setup PWA dependencies
id: setup_pwa_dependencies
run: |-
set -e
sudo apt-get update -yq && sudo apt-get install --no-install-recommends python2 python3-pip time -yq
sudo pip install -U pip setuptools
sudo pip install awscli==1.18.85 datadog==0.40.1
node ./scripts/gtime.js monorepo_install npm ci
npm ci
shell: bash
- name: Generate app
id: generate_app
uses: "./.github/actions/generate_app"
with:
use_extensibility: ${{ github.event.inputs.use_extensibility }}
project_id: ${{ github.event.inputs.project_id }}
instance_url: ${{ github.event.inputs.instance_url }}
org_id: ${{ github.event.inputs.org_id }}
short_code: ${{ github.event.inputs.short_code }}
client_id: ${{ github.event.inputs.client_id }}
site_id: ${{ github.event.inputs.site_id }}
is_private_client: ${{ github.event.inputs.is_private_client }}
setup_hybrid: ${{ github.event.inputs.setup_hybrid }}
project_dir: ${{ env.PROJECT_DIR }}
- name: Deploy app
id: deploy_app
uses: "./.github/actions/deploy_app"
with:
project_id: ${{ github.event.inputs.project_id }}
target_id: ${{ github.event.inputs.mrt_target_id }}
project_dir: "../generated-projects/${{ env.PROJECT_DIR }}"
mobify_user: ${{ secrets.MOBIFY_CLIENT_USER }}
mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }}