File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 39
39
path : |
40
40
build
41
41
key : ${{ runner.os }}-${{ github.sha }}
42
+
43
+ - name : Set preview path
44
+ run : echo "PREVIEW_PATH=sauce-docs/pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
45
+
42
46
- name : Install Dependencies
43
47
if : steps.cache-build.outputs.cache-hit != 'true' && github.event.action != 'closed' # Skip if the PR was closed
44
48
run : |
Original file line number Diff line number Diff line change 1
1
const unwrapJsx = require ( './src/plugins/unwrap-jsx' ) ;
2
+
3
+ // Enabling PR previews
4
+ let siteBaseUrl = "/"
5
+ if ( process . env . PREVIEW_PATH ) siteBaseUrl += process . env . PREVIEW_PATH
6
+
2
7
const docusaurusConfig = {
3
8
title : 'Sauce Labs Documentation' ,
4
9
tagline : 'Test all the things.' ,
5
10
url : 'https://docs.saucelabs.com' ,
6
11
noIndex : process . env . NO_INDEX ,
7
12
trailingSlash : true ,
8
- baseUrl : '/' ,
13
+ baseUrl : siteBaseUrl ,
9
14
onBrokenLinks : 'throw' ,
10
15
onBrokenMarkdownLinks : 'throw' ,
11
16
organizationName : 'saucelabs' ,
You can’t perform that action at this time.
0 commit comments