Deploy develop branch to Cloudflare Pages (#23454)

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Michael Telatynski 2022-11-08 13:27:20 +00:00 committed by GitHub
parent 65b8bc196a
commit 3be527cac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 12 deletions

View file

@ -10,6 +10,11 @@ const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
const SentryCliPlugin = require("@sentry/webpack-plugin");
// Environment variables
// RIOT_OG_IMAGE_URL: specifies the URL to the image which should be used for the opengraph logo.
// CSP_EXTRA_SOURCE: specifies a URL which should be appended to each CSP directive which uses 'self',
// this can be helpful if your deployment has redirects for old bundles, such as develop.element.io.
dotenv.config();
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
if (!ogImageUrl) ogImageUrl = 'https://app.element.io/themes/element/img/logos/opengraph.png';
@ -587,6 +592,7 @@ module.exports = (env, argv) => {
minify: false,
templateParameters: {
og_image_url: ogImageUrl,
csp_extra_source: process.env.CSP_EXTRA_SOURCE ?? "",
},
}),