Skip to content

Commit e921edd

Browse files
committed
fix: Fix site root
1 parent b1a8dfd commit e921edd

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# add the project root here
2+
PUBLIC_SITE_ROOT=http://localhost:3000

.github/workflows/lint-and-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
- name: Checkout code
5353
# Checks out the repository code.
5454
uses: actions/checkout@v4
55+
56+
- name: Load env file
57+
run: echo "${{ secrets.APPLICATION_ENV_FILE }}" > .env
5558

5659
- name: Setup Node.js ${{ inputs.node-version }}
5760
# Sets up NodeJS environment

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
# development files
77
.docusaurus/
88

9+
# env
10+
.env
11+
.env.*
12+
!.env.template
13+
914
# production
1015
/build
1116
*.tgz
1217

1318
# misc
1419
.DS_Store
15-
.env.local
16-
.env.development.local
17-
.env.test.local
18-
.env.production.local
1920

2021
npm-debug.log*
2122
yarn-debug.log*

docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const config = {
3838
favicon: 'img/favicon.ico',
3939

4040
// Set the production url of your site here
41-
url: 'https://react-chatbotify.com',
41+
url: process.env.PUBLIC_SITE_ROOT || 'http://localhost:3000',
4242
// Set the /<baseUrl>/ pathname under which your site is served
4343
// For GitHub pages deployment, it is often '/<projectName>/'
4444
baseUrl: '/docs',
@@ -89,6 +89,7 @@ const config = {
8989
logo: {
9090
alt: 'React ChatBotify Logo',
9191
src: 'img/react-chatbotify.png',
92+
href: process.env.PUBLIC_SITE_ROOT || '/',
9293
},
9394
items: [
9495
{

0 commit comments

Comments
 (0)