Skip to content

Commit cafb9c0

Browse files
committed
ty remove domain from build source
1 parent 1fd07a8 commit cafb9c0

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

.github/workflows/deploy-main.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,28 @@ name: Build and Deploy Main Branch
33

44
on:
55
push:
6-
branches:
7-
- main
6+
branches: [main]
87

98
permissions:
109
pages: write
1110
id-token: write
1211

1312
jobs:
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 }}

.github/workflows/deploy-pr.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# deploy-pr.yaml
2-
name: Build and Deploy PR Preview
3-
41
on:
52
pull_request:
63
types: [opened, synchronize]
7-
branches:
8-
- main
4+
branches: [main]
95

106
permissions:
117
pages: write
@@ -15,7 +11,6 @@ jobs:
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:

.github/workflows/reusable-build.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ name: Reusable Jekyll Build
33

44
on:
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

1316
jobs:
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

docs/_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ title_separator : "-"
2121
subtitle : "Official online documentation for the SIRIUS MS/MS Software" # site tagline that appears below site title in masthead
2222
name : "SIRIUS Software Project"
2323
description : "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"
2524
baseurl : "/" # the subpath of your site, e.g. "/blog"
2625
repository : "sirius-ms/sirius-docs.github.io" # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes"
2726
teaser : "/assets/images/sirius.png"# path of fallback teaser image, e.g. "/assets/images/500x300.png"

0 commit comments

Comments
 (0)