Skip to content

Commit 03f6c70

Browse files
CCM-15867 Consolidating shared scripts
1 parent 48882cf commit 03f6c70

4 files changed

Lines changed: 50 additions & 7 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Build Docs"
2+
description: "build jekyll docs"
3+
inputs:
4+
version:
5+
description: "Version number"
6+
required: true
7+
NODE_AUTH_TOKEN:
8+
description: "Token for access to github package registry"
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
registry-url: 'https://npm.pkg.github.com'
19+
- name: Npm cli install
20+
working-directory: .
21+
env:
22+
NODE_AUTH_TOKEN: ${{ inputs.NODE_AUTH_TOKEN }}
23+
run: npm ci
24+
shell: bash
25+
- name: Setup Ruby
26+
uses: ruby/setup-ruby@v1.180.1
27+
with:
28+
ruby-version: "3.2" # Not needed with a .ruby-version file
29+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30+
cache-version: 0 # Increment this number if you need to re-download cached gems
31+
working-directory: "./docs"
32+
- name: Setup Pages
33+
id: pages
34+
uses: actions/configure-pages@v5
35+
- name: Build with Jekyll
36+
working-directory: ./docs
37+
# Outputs to the './_site' directory by default
38+
shell: bash
39+
run: make build BASE_URL="${{ steps.pages.outputs.base_path }}" VERSION="${{ inputs.version }}"
40+
#run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
41+
env:
42+
JEKYLL_ENV: production
43+
44+
- name: Upload artifact
45+
# Automatically uploads an artifact from the './_site' directory by default
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: "docs/_site/"
49+
name: jekyll-docs-${{ inputs.version }}

.github/workflows/stage-3-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: "Checkout code"
5555
uses: actions/checkout@v5
5656
- name: "Build docs"
57-
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/build-docs@3.0.8
57+
uses: ./.github/actions/build-docs
5858
with:
5959
version: "${{ inputs.version }}"
6060
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"nhsuk-frontend": "^10.1.0"
55
},
66
"description": "",
7-
"devDependencies": {
8-
"tsx": "^4.20.6"
9-
},
107
"engines": {},
118
"keywords": [],
129
"license": "ISC",

package-lock.json

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)