Commit 0a08ca06 authored by tom's avatar tom

[skip ci] generate og image after validating envs

parent 2db6f6d6
...@@ -35,9 +35,6 @@ export_envs_from_preset() { ...@@ -35,9 +35,6 @@ export_envs_from_preset() {
# If there is a preset, load the environment variables from the its file # If there is a preset, load the environment variables from the its file
export_envs_from_preset export_envs_from_preset
# Generate OG image
node --no-warnings ./og_image_generator.js
# Download external assets # Download external assets
./download_assets.sh ./public/assets/configs ./download_assets.sh ./public/assets/configs
...@@ -61,6 +58,9 @@ else ...@@ -61,6 +58,9 @@ else
fi fi
echo echo
# Generate OG image
node --no-warnings ./og_image_generator.js
# Create envs.js file with run-time environment variables for the client app # Create envs.js file with run-time environment variables for the client app
./make_envs_script.sh ./make_envs_script.sh
......
...@@ -28,6 +28,7 @@ if (process.env.NEXT_PUBLIC_OG_IMAGE_URL) { ...@@ -28,6 +28,7 @@ if (process.env.NEXT_PUBLIC_OG_IMAGE_URL) {
background: bannerConfig.background?.[0], background: bannerConfig.background?.[0],
title_color: bannerConfig.text_color?.[0], title_color: bannerConfig.text_color?.[0],
invert_logo: !process.env.NEXT_PUBLIC_NETWORK_LOGO_DARK, invert_logo: !process.env.NEXT_PUBLIC_NETWORK_LOGO_DARK,
app_url: process.env.NEXT_PUBLIC_APP_HOST,
}; };
console.log('⏳ Making request to OG image generator service...'); console.log('⏳ Making request to OG image generator service...');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment