SalesforceCommerceCloud/pwa-kit/setup_pwa_manual #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |