diff --git a/.github/workflows/acceptance_headless.yml b/.github/workflows/acceptance_headless.yml index de9d83921..0850c45a5 100644 --- a/.github/workflows/acceptance_headless.yml +++ b/.github/workflows/acceptance_headless.yml @@ -6,9 +6,6 @@ jobs: headless-acceptance-tests: name: Chrome Acceptance Tests (Headless) runs-on: ubuntu-latest - env: - MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }} - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/static/js/default-map-api-key.js b/static/js/default-map-api-key.js index 7ede39712..ac847029f 100644 --- a/static/js/default-map-api-key.js +++ b/static/js/default-map-api-key.js @@ -11,9 +11,9 @@ export function getDefaultMapApiKey(mapProvider) { } switch (mapProvider.toLowerCase()) { case 'google': - return process.env.GOOGLE_API_KEY; + return 'AIzaSyB5D45ghF1YMfqTLSzWubmlCN1euBVPhFw'; case 'mapbox': - return process.env.MAPBOX_API_KEY; + return 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw'; default: throw new Error( `Given mapProvider: '${mapProvider}' is invalid. Expects either 'google' or 'mapbox'.` diff --git a/static/js/theme-map/Maps/Providers/Leaflet.js b/static/js/theme-map/Maps/Providers/Leaflet.js index c22d98573..3d8d314db 100644 --- a/static/js/theme-map/Maps/Providers/Leaflet.js +++ b/static/js/theme-map/Maps/Providers/Leaflet.js @@ -119,7 +119,7 @@ class LeafletPin extends ProviderPin { // Load Function -const yextAPIKey = process.env.LEAFLET_API_KEY; +const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw'; const baseUrl = 'https://unpkg.com/leaflet@1.6.0/dist/leaflet'; /** diff --git a/static/js/theme-map/Maps/Providers/Mapbox.js b/static/js/theme-map/Maps/Providers/Mapbox.js index e54f92f65..9f38a29ee 100644 --- a/static/js/theme-map/Maps/Providers/Mapbox.js +++ b/static/js/theme-map/Maps/Providers/Mapbox.js @@ -175,7 +175,7 @@ class MapboxPin extends ProviderPin { // Load Function -const yextAPIKey = process.env.MAPBOX_API_KEY; +const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw'; /** * This function is called when calling {@link MapProvider#load} on {@link module:Maps/Providers/Mapbox.MapboxMaps}. diff --git a/static/sample.env b/static/sample.env deleted file mode 100644 index 110fec8c2..000000000 --- a/static/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -MAPBOX_API_KEY=[[REPLACE_ME]] -BAIDU_API_KEY=[[REPLACE_ME]] -GOOGLE_API_KEY=[[REPLACE_ME]] -LEAFLET_API_KEY=[[REPLACE_ME]] \ No newline at end of file diff --git a/static/webpack-config.js b/static/webpack-config.js index 4045ab77e..882c304da 100644 --- a/static/webpack-config.js +++ b/static/webpack-config.js @@ -7,7 +7,6 @@ const RemovePlugin = require('remove-files-webpack-plugin'); const { merge } = require('webpack-merge'); const { parse } = require('comment-json'); const RtlCssPlugin = require('rtlcss-webpack-plugin'); -require('dotenv').config({ path: './.env' }); module.exports = function () { const jamboConfig = require('./jambo.json'); @@ -73,10 +72,6 @@ module.exports = function () { ...htmlPlugins, new webpack.DefinePlugin({ 'process.env.JAMBO_INJECTED_DATA': JSON.stringify(jamboInjectedData), - 'process.env.MAPBOX_API_KEY': JSON.stringify(process.env.MAPBOX_API_KEY) || 'REPLACE_ME', - 'process.env.BAIDU_API_KEY': JSON.stringify(process.env.BAIDU_API_KEY) || 'REPLACE_ME', - 'process.env.GOOGLE_API_KEY': JSON.stringify(process.env.GOOGLE_API_KEY) || 'REPLACE_ME', - 'process.env.LEAFLET_API_KEY': JSON.stringify(process.env.LEAFLET_API_KEY) || 'REPLACE_ME', }), new RemovePlugin({ after: { diff --git a/test-site/sample.env b/test-site/sample.env deleted file mode 100644 index 110fec8c2..000000000 --- a/test-site/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -MAPBOX_API_KEY=[[REPLACE_ME]] -BAIDU_API_KEY=[[REPLACE_ME]] -GOOGLE_API_KEY=[[REPLACE_ME]] -LEAFLET_API_KEY=[[REPLACE_ME]] \ No newline at end of file