Workflow file for this run
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_template_reatil_react_app_manual | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
setup-pwa-kit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Initialize | ||
shell: bash | ||
run: | | ||
set -e | ||
echo "PROJECT_SLUG=scaffold-pwa" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
- name: 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: Build template-retail-react-app | ||
shell: bash | ||
run: |- | ||
set -e | ||
cd packages/template-retail-react-app | ||
npm run build | ||
- name: Create MRT credentials file | ||
uses: "./.github/actions/create_mrt" | ||
with: | ||
mobify_user: ${{ secrets.MOBIFY_CLIENT_USER }} | ||
mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }} | ||
- name: Create MRT Target | ||
uses: "./.github/actions/create_mrt_target" | ||
with: | ||
project_name: ${{ env.PROJECT_SLUG }} | ||
target_name: ${{ env.BRANCH_NAME }} | ||
mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }} | ||
- name: Push Bundle to MRT (E2E Test PWA Kit) | ||
uses: "./.github/actions/push_to_mrt" | ||
with: | ||
CWD: "." | ||
TARGET: ${{ env.BRANCH_NAME }} | ||
FLAGS: --wait |