diff --git a/.github/deployment/Dockerfile-affine b/.github/deployment/Dockerfile-affine
index 76c317d6c8..b3d1fb367c 100644
--- a/.github/deployment/Dockerfile-affine
+++ b/.github/deployment/Dockerfile-affine
@@ -1,5 +1,5 @@
FROM node:16-alpine as builder
-ARG HUBSPOT_API_SECRET
+ARG AFFINE_EMBED_HEADER
WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
diff --git a/.github/workflows/livedemo.yml b/.github/workflows/livedemo.yml
index 432fbaf13d..9be0843454 100644
--- a/.github/workflows/livedemo.yml
+++ b/.github/workflows/livedemo.yml
@@ -71,7 +71,7 @@ jobs:
tags: ${{ env.LOCAL_CACHE }}
target: AFFiNE
build-args: |
- HUBSPOT_API_SECRET=${{ secrets.HUBSPOT_API_SECRET }}
+ AFFINE_EMBED_HEADER=${{ secrets.AFFINE_EMBED_HEADER }}
- name: Build and push Docker image (AFFINE-Local)
uses: docker/build-push-action@v3
diff --git a/apps/ligo-virgo/src/template.html b/apps/ligo-virgo/src/template.html
index badce60082..56d1a90123 100644
--- a/apps/ligo-virgo/src/template.html
+++ b/apps/ligo-virgo/src/template.html
@@ -4,7 +4,7 @@
<%= htmlWebpackPlugin.options.title %>
- <%= htmlWebpackPlugin.options.hubspotScript %>
+ <%= htmlWebpackPlugin.options.embedHeaderScript %>
diff --git a/apps/ligo-virgo/webpack.config.js b/apps/ligo-virgo/webpack.config.js
index 4f14dba4c7..3b0750fade 100644
--- a/apps/ligo-virgo/webpack.config.js
+++ b/apps/ligo-virgo/webpack.config.js
@@ -11,13 +11,7 @@ const TerserPlugin = require('terser-webpack-plugin');
const Style9Plugin = require('style9/webpack');
const enableBundleAnalyzer = process.env.BUNDLE_ANALYZER;
-
-function generateHubspotScript() {
- const hubspotApiSecret = process.env.HUBSPOT_API_SECRET;
- if (hubspotApiSecret) {
- return ``;
- }
-}
+const embedHeaderScript = process.env.AFFINE_EMBED_HEADER;
module.exports = function (webpackConfig) {
const config = getNxWebpackConfig(webpackConfig);
@@ -185,7 +179,7 @@ module.exports = function (webpackConfig) {
), //favicon path
template: path.resolve(__dirname, './src/template.html'),
publicPath: '/',
- hubspotScript: generateHubspotScript(),
+ embedHeaderScript,
}),
new Style9Plugin(),
isProd &&