File tree Expand file tree Collapse file tree 4 files changed +20
-21
lines changed Expand file tree Collapse file tree 4 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -3,26 +3,28 @@ name: Build and Deploy Main Branch
33
44on :
55 push :
6- branches :
7- - main
6+ branches : [main]
87
98permissions :
109 pages : write
1110 id-token : write
1211
1312jobs :
14- # Call the reusable build workflow
15- build :
16- uses : ./.github/workflows/reusable-build.yaml
17-
18- # The deploy job stays the same, as it depends on the output of the build job
13+ # This job gets the environment URL and triggers the build
1914 deploy :
20- needs : build
2115 runs-on : ubuntu-latest
2216 environment :
2317 name : github-pages
2418 url : ${{ steps.deployment.outputs.page_url }}
2519 steps :
2620 - name : Deploy to GitHub Pages
2721 id : deployment
28- uses : actions/deploy-pages@v4
22+ uses : actions/deploy-pages@v4
23+
24+ # This job is now triggered by the deploy job
25+ build :
26+ needs : deploy
27+ uses : ./.github/workflows/reusable-build.yaml
28+ with :
29+ # Pass the final deployment URL to the build
30+ url : ${{ needs.deploy.outputs.page_url }}
Original file line number Diff line number Diff line change 1- # deploy-pr.yaml
2- name : Build and Deploy PR Preview
3-
41on :
52 pull_request :
63 types : [opened, synchronize]
7- branches :
8- - main
4+ branches : [main]
95
106permissions :
117 pages : write
1511 build :
1612 uses : ./.github/workflows/reusable-build.yaml
1713 with :
18- # Pass the repository name as the baseurl for previews
1914 baseurl : " /sirius-docs.github.io"
2015
2116 deploy :
Original file line number Diff line number Diff line change @@ -3,12 +3,15 @@ name: Reusable Jekyll Build
33
44on :
55 workflow_call :
6- # Define an optional input for the baseurl
76 inputs :
87 baseurl :
98 required : false
109 type : string
1110 default : ' ""'
11+ url :
12+ required : false
13+ type : string
14+ default : ' ""'
1215
1316jobs :
1417 build :
@@ -25,10 +28,10 @@ jobs:
2528
2629 - name : Build Jekyll Site
2730 working-directory : ./docs
28- env :
29- JEKYLL_ENV : production
30- # Use the input to set the baseurl, otherwise it's an empty string
31- run : bundle exec jekyll build --baseurl " ${{ inputs.baseurl }}"
31+ run : >
32+ bundle exec jekyll build
33+ --baseurl "${{ inputs. baseurl }}"
34+ --config "_config.yml,url: ${{ inputs.url }}"
3235
3336 - name : Upload artifact
3437 uses : actions/upload-pages-artifact@v3
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ title_separator : "-"
2121subtitle : " Official online documentation for the SIRIUS MS/MS Software" # site tagline that appears below site title in masthead
2222name : " SIRIUS Software Project"
2323description : " Official online documentation for the SIRIUS MS/MS Software"
24- url : " https://v6.docs.sirius-ms.io/" # the base hostname & protocol for your site e.g. "https://mmistakes.github.io"
2524baseurl : " /" # the subpath of your site, e.g. "/blog"
2625repository : " sirius-ms/sirius-docs.github.io" # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes"
2726teaser : " /assets/images/sirius.png" # path of fallback teaser image, e.g. "/assets/images/500x300.png"
You can’t perform that action at this time.
0 commit comments