From 743f8e711e2927072901e55ac4edcb0fd46f4d0d Mon Sep 17 00:00:00 2001 From: Florian Dieminger Date: Wed, 27 Sep 2023 17:45:15 +0200 Subject: [PATCH] fix(samples):fix LiveSampleLink and unify domains resolves: https://github.com/mdn/content/issues/29249 --- .github/workflows/prod-build.yml | 4 ++-- .github/workflows/stage-build.yml | 2 +- kumascript/macros/LiveSampleLink.ejs | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prod-build.yml b/.github/workflows/prod-build.yml index 66f3a738677c..ad6bb8d53b2a 100644 --- a/.github/workflows/prod-build.yml +++ b/.github/workflows/prod-build.yml @@ -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 }} @@ -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/" \ diff --git a/.github/workflows/stage-build.yml b/.github/workflows/stage-build.yml index 1e9d8ed8b2b5..c68290c6c23d 100644 --- a/.github/workflows/stage-build.yml +++ b/.github/workflows/stage-build.yml @@ -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 }} diff --git a/kumascript/macros/LiveSampleLink.ejs b/kumascript/macros/LiveSampleLink.ejs index d44caa8c315d..a670554d51f0 100644 --- a/kumascript/macros/LiveSampleLink.ejs +++ b/kumascript/macros/LiveSampleLink.ejs @@ -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. %> -<%=$1%> +<%=$1%>