-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (45 loc) · 1.53 KB
/
action.yml
File metadata and controls
50 lines (45 loc) · 1.53 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
name: deploy_app
description: Deploy application to MRT
inputs:
project_id:
description: MRT Project ID
target_id:
description: MRT Target ID
project_dir:
description: Project Directory
mobify_user:
description: "Mobify user email"
mobify_api_key:
description: "Mobify user API key"
runs:
using: composite
steps:
- name: Create MRT credentials file
id: create_mrt_credentials
uses: "./.github/actions/create_mrt"
with:
mobify_user: ${{ inputs.mobify_user }}
mobify_api_key: ${{ inputs.mobify_api_key }}
- name: Read application config
id: read_config
shell: bash
run: |
# Read proxy configs from the default config file using Node.js
config=$(node -e "console.log(JSON.stringify(require('${{ inputs.project_dir }}/config/default.js')))")
# Extract proxyConfigs as a JSON string
echo "proxy_configs=$(echo "$config" | jq -c '.ssrParameters.proxyConfigs' | jq @json)" >> $GITHUB_OUTPUT
- name: Create MRT target
id: create_mrt_target
uses: "./.github/actions/create_mrt_target"
with:
project_id: ${{ inputs.project_id }}
target_id: ${{ inputs.target_id }}
proxy_configs: ${{ steps.read_config.outputs.proxy_configs }}
mobify_api_key: ${{ inputs.mobify_api_key }}
- name: Push bundle to MRT
id: push_bundle
uses: "./.github/actions/push_to_mrt"
with:
CWD: ${{ inputs.project_dir }}
TARGET: ${{ inputs.target_id }}
FLAGS: --wait