-
Notifications
You must be signed in to change notification settings - Fork 212
@W-17900760@ Deploy Demo Storefront with SLAS Private Client #2297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a46d145
474b0a4
f9fe4cd
efd0610
cb39e57
f8208b8
e496643
97b1fa7
d662a3f
f0deacb
d4f9b80
4d7b89d
1c63829
ccd15e6
3cac50c
4edc95f
70963d7
fac54ed
7d69a87
ee90db9
6c85fe2
70556ec
1add78b
17b4440
424d1cb
137cc6f
c0725e9
3c60cb7
5048c02
264ff06
472d336
19b87e0
57593e9
1ae59cb
3535578
2fb735a
7252dfe
af69be8
8ad09cf
e71baf0
e7da5be
6ec6c7b
e5358bf
5920ebb
45a66b1
bd51f1a
5ec3954
9afbfdc
ef88feb
f432ace
bcac19c
7f6185b
fcff88a
bc17df1
2aff6f0
a9e1e9b
86e064f
dc0de62
193485b
3c3fa8b
0294eb9
7d25a03
3fd0db6
288cb66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,20 +101,14 @@ jobs: | |
| mobify_user: ${{ secrets.MOBIFY_CLIENT_USER }} | ||
| mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }} | ||
|
|
||
| # TODO - Do we still need this? | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it doesn't hurt to keep it. So that every time
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue with this is that this deploys the template-retail-react-app using a SLAS public client and not the generated app with a private client. But I also see the value in having nightlies deployed onto an env. I can keep it for now but maybe we should deploy to a dev environment instead in the future?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 I see.. this is getting confusing 😅 I think for now, let's have the TODO comment be clearer. For me in this case, I'd like to see staging be almost identical to production. The only difference I feel that matters is how frequently they're updated. But anyways, probably this is not in scope. Just as an aside, the whole picture is muddy because each time |
||
| - name: Push Bundle to MRT (Development) | ||
| if: env.IS_NOT_FORK == 'true' && env.IS_MRT_NODE == 'true' && env.DEVELOP == 'true' | ||
| uses: "./.github/actions/push_to_mrt" | ||
| with: | ||
| CWD: "./packages/template-retail-react-app" | ||
| TARGET: staging | ||
|
|
||
| - name: Push Bundle to MRT (Production) | ||
| if: env.IS_NOT_FORK == 'true' && env.IS_MRT_NODE == 'true' && env.RELEASE == 'true' | ||
| uses: "./.github/actions/push_to_mrt" | ||
| with: | ||
| CWD: "./packages/template-retail-react-app" | ||
| TARGET: production | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this since this is redundant. We are now deploying a preset to the demo site when a new latest release tag is produced. This does mean that we won't be deploying preview releases onto the live demo site but I can create a different step to handle this if we want. |
||
|
|
||
| - name: Push Bundle to MRT (Commerce SDK React) | ||
| if: env.IS_NOT_FORK == 'true' && env.IS_MRT_NODE == 'true' && env.DEVELOP == 'true' | ||
| uses: "./.github/actions/push_to_mrt" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,17 +10,32 @@ module.exports = { | |
| app: { | ||
| // Customize how your 'site' and 'locale' are displayed in the url. | ||
| url: { | ||
| {{#if answers.project.demo.enableDemoSettings}} | ||
| // Determine where the siteRef is located. Valid values include 'path|query_param|none'. Defaults to: 'none' | ||
| // site: 'none', | ||
| site: 'path', | ||
| // Determine where the localeRef is located. Valid values include 'path|query_param|none'. Defaults to: 'none' | ||
| locale: 'none' | ||
| locale: 'path', | ||
| // This boolean value dictates whether or not default site or locale values are shown in the url. Defaults to: false | ||
| // showDefaults: true | ||
| showDefaults: true, | ||
| {{else}} | ||
| // Determine where the siteRef is located. Valid values include 'path|query_param|none'. Defaults to: 'none' | ||
| site: 'none', | ||
| // Determine where the localeRef is located. Valid values include 'path|query_param|none'. Defaults to: 'none' | ||
| locale: 'none', | ||
| // This boolean value dictates whether or not default site or locale values are shown in the url. Defaults to: false | ||
| showDefaults: false, | ||
| {{/if}} | ||
| // This boolean value dictates whether the plus sign (+) is interpreted as space for query param string. Defaults to: false | ||
| interpretPlusSignAsSpace: false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, thanks. It looks like last time we missed adding |
||
| }, | ||
| login: { | ||
| passwordless: { | ||
| // Enables or disables passwordless login for the site. Defaults to: false | ||
| {{#if answers.project.demo.enableDemoSettings}} | ||
| enabled: true, | ||
| {{else}} | ||
| enabled: false, | ||
| {{/if}} | ||
| // The callback URI, which can be an absolute URL (including third-party URIs) or a relative path set up by the developer. | ||
| // Required in 'callback' mode; if missing, passwordless login defaults to 'sms' mode, which requires Marketing Cloud configuration. | ||
| // If the env var `PASSWORDLESS_LOGIN_CALLBACK_URI` is set, it will override the config value. | ||
|
|
@@ -31,7 +46,11 @@ module.exports = { | |
| }, | ||
| social: { | ||
| // Enables or disables social login for the site. Defaults to: false | ||
| {{#if answers.project.demo.enableDemoSettings}} | ||
| enabled: true, | ||
| {{else}} | ||
| enabled: false, | ||
| {{/if}} | ||
| // The third-party identity providers supported by your app. The PWA Kit supports Google and Apple by default. | ||
| // Additional IDPs will also need to be added to the IDP_CONFIG in the SocialLogin component. | ||
| idps: ['google', 'apple'], | ||
|
|
@@ -51,9 +70,17 @@ module.exports = { | |
| // The default site for your app. This value will be used when a siteRef could not be determined from the url | ||
| defaultSite: '{{answers.project.commerce.siteId}}', | ||
| // Provide aliases for your sites. These will be used in place of your site id when generating paths throughout the application. | ||
| {{#if answers.project.demo.enableDemoSettings}} | ||
| siteAliases: { | ||
| RefArch: 'us', | ||
| RefArchGlobal: 'global' | ||
| }, | ||
vmarta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| {{else}} | ||
| // siteAliases: { | ||
| // RefArch: 'us' | ||
| // RefArch: 'us', | ||
| // RefArchGlobal: 'global' | ||
| // }, | ||
| {{/if}} | ||
| // The sites for your app, which is imported from sites.js | ||
| sites, | ||
| // Commerce api config | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,7 +82,14 @@ const Home = () => { | |
| /> | ||
|
|
||
| <Hero | ||
| {{#if answers.project.demo.enableDemoSettings}} | ||
| title={intl.formatMessage({ | ||
| defaultMessage: 'The React PWA Starter Store for Retail', | ||
| id: 'home.title.react_starter_store' | ||
| })} | ||
| {{else}} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small change here to make it more obvious in the demo site when locale is changed to another language. |
||
| title={CUSTOM_HOME_TITLE} | ||
| {{/if}} | ||
| img=\{{ | ||
| src: getAssetUrl('static/img/hero.png'), | ||
| alt: 'npx pwa-kit-create-app' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: since we're echoing this same message in both if/else conditions, we can extract it and run the message once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having the action print a message is helpful since it's possible that we reuse it later on to check for latest release in other workflows.
I separated out the part that stops the workflow since we might use the action for something other than stopping a deployment
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @vcua-mobify I meant something simpler. Rearranging the code slightly like this for example: