File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1919 with :
2020 node-version : ' 20.14'
2121
22+ # Inject BRANCH_NAME into environment variables
23+ - name : Set BRANCH_NAME
24+ run : echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
2225
2326 # Navigate to the correct working directory and install dependencies
2427 - name : Install dependencies
Original file line number Diff line number Diff line change 1- require ( 'dotenv' ) . config ( ) ;
21const { themes } = require ( 'prism-react-renderer' ) ;
32const { languageTabs } = require ( './static/languageTabs.mjs' ) ;
4- const isDev = process . env . NODE_ENV === 'development' ;
3+ const BRANCH_NAME = process . env . BRANCH_NAME ;
4+ const ALGOLIA_INDEX_NAME = BRANCH_NAME === 'main' ? 'doc_babylonlabs_io' : 'doc_dev_babylonlabs_io' ;
55const code_themes = {
66 light : themes . github ,
77 dark : themes . dracula ,
@@ -290,7 +290,7 @@ const config = {
290290 algolia : {
291291 appId : process . env . ALGOLIA_APP_ID ,
292292 apiKey : process . env . ALGOLIA_API_KEY ,
293- indexName : isDev ? 'doc_dev_babylonlabs_io' : 'doc_babylonlabs_io' ,
293+ indexName : ALGOLIA_INDEX_NAME ,
294294 contextualSearch : true ,
295295 searchParameters : { } ,
296296 contextualSearchFilters : [ ] ,
You can’t perform that action at this time.
0 commit comments