Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v4
with:
cache: 'npm'
- run: yarn install --frozen-lockfile
- run: bundle exec rake
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v4
with:
cache: 'npm'
- run: yarn install --frozen-lockfile
- name: Build 'build' folder ready for deployment
run: bundle exec rake build
env:
Expand Down Expand Up @@ -78,4 +82,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
6 changes: 6 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
activate :search_engine_sitemap,
default_change_frequency: "weekly"

# Load all the `dist/` directories from direct dependencies specified in package.json
package = JSON.parse(File.read("package.json"))
package.fetch("dependencies", []).each_key do |dep|
sprockets.append_path File.join(__dir__, "node_modules", dep, "dist")
end

helpers do
def dashboard
Dashboard.new
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "govuk-developer-docs",
"description": "Developer docs for GOV.UK Publishing",
"private": true,
"author": "Government Digital Service",
"license": "MIT",
"dependencies": {
"mermaid": "^11.4.1"
}
}
1 change: 1 addition & 0 deletions source/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
//= require govuk_publishing_components/components/cookie-banner
//= require govuk_publishing_components/load-analytics
//= require filter-list
//= require mermaid-init
7 changes: 7 additions & 0 deletions source/javascripts/mermaid-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//= require mermaid

mermaid.initialize({ startOnLoad: false });
mermaid.run({
querySelector: '[lang="mermaid"] code',
});

Loading
Loading