File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1+ # deploy-pr.yaml
12name : Build and Deploy PR Preview
23
34on :
@@ -13,15 +14,15 @@ permissions:
1314jobs :
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
Original file line number Diff line number Diff line change 11# .github/workflows/reusable-build.yaml
22name : Reusable Jekyll Build
33
4- # This trigger allows the workflow to be called by other workflows
54on :
65 workflow_call :
6+ # Define an optional input for the baseurl
7+ inputs :
8+ baseurl :
9+ required : false
10+ type : string
11+ default : ' ""'
712
813jobs :
914 build :
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
You can’t perform that action at this time.
0 commit comments