Skip to content

Commit

Permalink
fix baseURL for previews
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfornuto committed May 6, 2024
1 parent 80e42d7 commit 1941b1a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
run: BASEURL='/' yarn build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ jobs:
run: git submodule init && git submodule update --remote --merge
- name: Install and Build
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed
env:
pr: ${{ github.event.number }}
run: |
echo "pr=$pr" >> $GITHUB_ENV
yarn install --frozen-lockfile
yarn build
BASEURL='/pr-preview/pr-$pr' yarn build

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const config = {
url: 'https://keychain.org',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: process.env.BASEURL,

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down

0 comments on commit 1941b1a

Please sign in to comment.