Skip to content

Commit 1fd07a8

Browse files
committed
try fix missing styles in production build
1 parent 65f978c commit 1fd07a8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/deploy-pr.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# deploy-pr.yaml
12
name: Build and Deploy PR Preview
23

34
on:
@@ -13,15 +14,15 @@ permissions:
1314
jobs:
1415
build:
1516
uses: ./.github/workflows/reusable-build.yaml
17+
with:
18+
# Pass the repository name as the baseurl for previews
19+
baseurl: "/sirius-docs.github.io"
1620

17-
# This job now deploys to the 'staging' environment
1821
deploy:
1922
needs: build
2023
runs-on: ubuntu-latest
2124
environment:
22-
# Use your new 'staging' environment
2325
name: staging
24-
# The URL will be generated automatically by the deploy action
2526
url: ${{ steps.deployment.outputs.page_url }}
2627
steps:
2728
- name: Deploy to Staging

.github/workflows/reusable-build.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# .github/workflows/reusable-build.yaml
22
name: Reusable Jekyll Build
33

4-
# This trigger allows the workflow to be called by other workflows
54
on:
65
workflow_call:
6+
# Define an optional input for the baseurl
7+
inputs:
8+
baseurl:
9+
required: false
10+
type: string
11+
default: '""'
712

813
jobs:
914
build:
@@ -22,7 +27,8 @@ jobs:
2227
working-directory: ./docs
2328
env:
2429
JEKYLL_ENV: production
25-
run: bundle exec jekyll build
30+
# Use the input to set the baseurl, otherwise it's an empty string
31+
run: bundle exec jekyll build --baseurl "${{ inputs.baseurl }}"
2632

2733
- name: Upload artifact
2834
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)