Skip to content

Commit b51bb27

Browse files
committed
chore(docs): set Docusaurus base_url in env var
1 parent 1982061 commit b51bb27

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/deploy-docusaurus.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ jobs:
6060
- name: Build the Docusaurus site
6161
working-directory: ./packages/docs
6262
run: npm run build
63+
env:
64+
# when deploying to a subdirectory of the <org>.github.io domain,
65+
# we need to set the BASE_URL to the name of the repo, for a custom
66+
# domain this could be /docs/
67+
BASE_URL: /blockly/
6368

6469
- name: Setup GitHub Pages
6570
uses: actions/configure-pages@v5

packages/docs/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const config = {
1414
},
1515

1616
url: 'https://raspberrypifoundation.github.io',
17-
baseUrl: '/docs/',
17+
baseUrl: process.env.BASE_URL || '/docs/',
1818

1919
// GitHub pages deployment config
2020
organizationName: 'RaspberryPiFoundation',

0 commit comments

Comments
 (0)