Skip to content

Commit 17adacd

Browse files
committed
fix: derive GitHub Pages URL from repo owner and name
1 parent 15006c5 commit 17adacd

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/messenger-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525

2626
- name: Generate and build Messenger docs
2727
run: yarn docs:messenger:build
28+
env:
29+
DOCS_URL: https://${{ github.repository_owner }}.github.io
30+
DOCS_BASE_URL: /${{ github.event.repository.name }}/
2831

2932
- name: Upload build artifact (PR)
3033
if: github.event_name == 'pull_request'

packages/messenger-docs/template/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ if (extraNodeModules) {
2626
const config: Config = {
2727
title: 'Messenger API',
2828
tagline: 'Action and event reference for MetaMask controller messengers',
29-
url: 'https://metamask.github.io',
30-
baseUrl: '/',
29+
url: process.env.DOCS_URL || 'https://metamask.github.io', // eslint-disable-line no-process-env
30+
baseUrl: process.env.DOCS_BASE_URL || '/', // eslint-disable-line no-process-env
3131
favicon: 'img/favicons/favicon-96x96.png',
3232

3333
onBrokenLinks: 'warn',

0 commit comments

Comments
 (0)