Skip to content

Commit

Permalink
fix(samples):fix LiveSampleLink and unify domains
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Sep 27, 2023
1 parent e9162fb commit 743f8e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
# secure production but this is an exception and default
# is not insecure.
BUILD_LIVE_SAMPLES_BASE_URL: https://live.mdnplay.dev
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live-samples.mdn.mozilla.net
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live.mdnplay.dev

# Sign key for code samples
BUILD_SAMPLE_SIGN_KEY: ${{ secrets.SAMPLE_SIGN_KEY }}
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
--memory=2GB \
--timeout=60s \
--set-env-vars="ORIGIN_MAIN=developer.mozilla.org" \
--set-env-vars="ORIGIN_LIVE_SAMPLES=live-samples.mdn.mozilla.net" \
--set-env-vars="ORIGIN_LIVE_SAMPLES=live.mdnplay.dev" \
--set-env-vars="ORIGIN_PLAY=mdnplay.dev" \
--set-env-vars="SOURCE_CONTENT=https://storage.googleapis.com/${{ vars.GCP_BUCKET_NAME }}/main/" \
--set-env-vars="SOURCE_API=https://api.developer.mozilla.org/" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
# secure production but this is an exception and default
# is not insecure.
BUILD_LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live-samples.mdn.allizom.net
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev

# Sign key for code samples
BUILD_SAMPLE_SIGN_KEY: ${{ secrets.SAMPLE_SIGN_KEY }}
Expand Down
4 changes: 3 additions & 1 deletion kumascript/macros/LiveSampleLink.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
// $1 - The link label
//
// See also : EmbedLiveSample
//
// We pass evn.url as $1 to LiveSampleURL to enforce fallback to prebuild samples.
%>
<a href="<%= await template('LiveSampleURL', [$0]) %>"><%=$1%></a>
<a href="<%= await template('LiveSampleURL', [$0, env.url]) %>"><%=$1%></a>

0 comments on commit 743f8e7

Please sign in to comment.