Skip to content

Commit 9f542f3

Browse files
authoredNov 27, 2023
Chore: remove shim script and disable ja checks (circleci#8471)
* remove shim script * disable HTMLproofer for all ja files * ignore api files
1 parent 842c4ee commit 9f542f3

File tree

3 files changed

+16
-35
lines changed

3 files changed

+16
-35
lines changed
 

‎.circleci/config.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ commands:
9090
workflows:
9191

9292
build-deploy:
93-
when:
93+
when:
9494
not: << pipeline.parameters.run-schedule >>
9595
jobs:
9696
- build_server_pdfs:
@@ -220,9 +220,6 @@ jobs:
220220
mkdir -p /tmp/workspace/pdfs
221221
cp -r /tmp/workspace/api/* jekyll/_api/
222222
- run: sudo apt-get update; sudo apt-get --yes install nkf
223-
- run:
224-
name: Shim untranslated Japanese pages
225-
command: ./scripts/shim-translation.sh jekyll/_cci2 jekyll/_cci2_ja
226223
- set-jekyll-basename
227224
- run:
228225
name: Build the Jekyll site
@@ -253,7 +250,7 @@ jobs:
253250
root: ~/circleci-docs/jekyll/
254251
paths:
255252
- _site/*
256-
253+
257254
reindex-search:
258255
executor:
259256
name: ruby/default
@@ -286,4 +283,4 @@ jobs:
286283
- image: cibuilds/aws:1.16.185
287284
steps:
288285
- trigger-docs-platform-build
289-
286+

‎Rakefile

+13-18
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ require 'dotenv/load'
66
JEKYLL_BASENAME = ENV['JEKYLL_BASENAME'] || 'docs'
77
HTML_PROOFER_PARALLEL = ENV['HTML_PROOFER_PARALLEL'] || 4
88

9-
desc 'Shim untranslated Japanese pages'
10-
task :shim_untranslated do
11-
sh './scripts/shim-translation.sh jekyll/_cci2 jekyll/_cci2_ja'
12-
end
13-
149
desc 'Build Jekyll site'
1510
task :build do
1611
# Build the Jekyll site
@@ -35,34 +30,34 @@ task :make_mock_api do
3530
end
3631

3732
desc 'Build your jekyll site in local env'
38-
task :build_local => [:shim_untranslated, :build, :make_mock_api] do
33+
task :build_local => [:build, :make_mock_api] do
3934
puts 'Finish building your jekyll site, and now you can run `bundle exec rake test` to run `HTMLproofer` test'
4035
end
4136

4237
desc 'Test with HTMLproofer'
4338
task :test do
39+
4440
def makeFilePath(target_dir)
4541
return "./jekyll/_site/#{JEKYLL_BASENAME}/#{target_dir}/index.html"
4642
end
4743

4844
ignore_dirs = [
4945
"api/v2",
50-
"ja/2.0/runner-installation",
51-
"ja/2.0/security-server",
52-
"ja/2.0/v.2.19-overview",
53-
"ja/2.0/customizations",
54-
"ja/2.0/aws-prereq",
55-
"ja/2.0/ops",
56-
"ja/2.0/about-circleci",
57-
"ja/2.0/demo-apps",
58-
"ja/2.0/google-auth",
59-
"ja/2.0/orb-concepts",
60-
"ja/2.0/tutorials",
6146
"reference-2-1"
6247
]
6348

6449
ignore_files = ignore_dirs.map {|d| makeFilePath(d)}
65-
options = { :allow_hash_href => true, :check_favicon => false, :check_html => true, :disable_external => true, :empty_alt_ignore => true, :parallel => { :in_processes => HTML_PROOFER_PARALLEL}, :file_ignore => ignore_files}
50+
ignore_ja_files = Dir.glob("./jekyll/_site/#{JEKYLL_BASENAME}/ja/**/*").select { |e| File.file? e };
51+
52+
options = {
53+
:allow_hash_href => true,
54+
:check_favicon => false,
55+
:check_html => true,
56+
:disable_external => true,
57+
:empty_alt_ignore => true,
58+
:parallel => { :in_processes => HTML_PROOFER_PARALLEL},
59+
:file_ignore => ignore_files.concat(ignore_ja_files),
60+
}
6661

6762
HTMLProofer.check_directory("./jekyll/_site", options).run
6863
end

‎scripts/shim-translation.sh

-11
This file was deleted.

0 commit comments

Comments
 (0)