Skip to content

Commit

Permalink
CI:preview action: docasaurus specialization
Browse files Browse the repository at this point in the history
	modified:   .github/workflows/preview.yml
	modified:   docusaurus.config.ts
  • Loading branch information
s-sajid-ali committed Nov 4, 2024
1 parent 012752f commit 1148f0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- run: echo "PREVIEW_PATH=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"

- name: Install and Build
if: github.event.action != 'closed' # Skip the build if the PR has been closed
Expand Down
9 changes: 8 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
let baseUrl = '/rts-docs-dev/';
if (process.env.PREVIEW_PATH) {
baseUrl += process.env.PREVIEW_PATH;
}

const config: Config = {
title: 'Research Technology Servcies',
tagline: 'NYU',
Expand All @@ -11,7 +18,7 @@ const config: Config = {
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/rts-docs-dev/',
baseUrl: baseUrl,

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

0 comments on commit 1148f0a

Please sign in to comment.