Skip to content

Commit a59f2ca

Browse files
committed
Merge branch 'main' into DOCSS-1854-html-proofer
2 parents 2b7bc2a + 829d8e0 commit a59f2ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1759
-29
lines changed

.circleci/config.yml

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ parameters:
66
default: ""
77

88
orbs:
9-
aws-cli: circleci/[email protected]
9+
aws-cli: circleci/[email protected]
10+
vale: circleci/[email protected]
1011

1112
executors:
1213
node_executor:
@@ -63,9 +64,9 @@ jobs:
6364
steps:
6465
- checkout
6566
- run:
66-
name: Fetch branches matching server-*
67+
name: Fetch branches matching server-4*
6768
command: |
68-
for branch in $(git ls-remote --heads origin | awk '{print $2}' | grep 'refs/heads/server-' | sed 's|refs/heads/||'); do
69+
for branch in $(git ls-remote --heads origin | awk '{print $2}' | grep 'refs/heads/server-4' | sed 's|refs/heads/||'); do
6970
echo "[INFO] Fetching branch: $branch"
7071
git checkout "$branch"
7172
git pull origin "$branch"
@@ -108,7 +109,6 @@ jobs:
108109
- notify_error:
109110
message: "Build job failed for branch ${CIRCLE_BRANCH}"
110111

111-
112112
validate:
113113
executor: ruby_executor
114114
steps:
@@ -138,7 +138,6 @@ jobs:
138138
- notify_error:
139139
message: "Validation job failed for branch ${CIRCLE_BRANCH}"
140140

141-
142141
deploy-preview:
143142
executor: node_executor
144143
steps:
@@ -192,20 +191,42 @@ jobs:
192191
fi
193192
- notify_error:
194193
message: "Deploy preview job failed for branch ${CIRCLE_BRANCH}"
195-
194+
# - aws-setup
195+
# - run:
196+
# name: Test S3 deployment
197+
# command: |
198+
# set -e
199+
# echo "[INFO] Testing deploy to S3 bucket..."
200+
# aws s3 sync build "s3://circleci-docs-platform-assets/docs/dorian/"
196201

197202
deploy-production:
198203
executor: node_executor
204+
parameters:
205+
bucket_dir:
206+
default: "dorian"
207+
description: The directory in the bucket to deploy to.
208+
type: string
209+
bucket_name:
210+
description: The name of the s3 bucket where static assets are stored.
211+
type: string
212+
build_dir:
213+
default: "build"
214+
description: The path to the docs build directory
215+
type: string
199216
steps:
200217
- attach_workspace:
201218
at: .
202219
- aws-setup
203220
- run:
204221
name: Deploy Production Site to S3
205222
command: |
223+
AWS_S3_BUCKET=<< parameters.bucket_name >>
224+
BUCKET_DIRECTORY=<< parameters.bucket_dir >>
225+
BUILD_DIRECTORY=<< parameters.build_dir >>
226+
206227
set -e
207228
echo "[INFO] Deploying production site..."
208-
aws s3 sync build s3://${DOCS_BUILD_BUCKET}/ --delete --endpoint-url ${S3_ENDPOINT}
229+
aws s3 sync "$BUILD_DIRECTORY" "s3://$AWS_S3_BUCKET/$BUCKET_DIRECTORY/"
209230
- notify_error:
210231
message: "Production deployment job failed for branch ${CIRCLE_BRANCH}"
211232

@@ -250,8 +271,14 @@ jobs:
250271
echo "[WARN] Tag '${TAG}' not found."
251272
fi
252273
253-
254274
workflows:
275+
lint:
276+
unless:
277+
equal: [main, << pipeline.git.branch >>]
278+
jobs:
279+
- vale/lint:
280+
reference_branch: main
281+
base_dir: docs
255282
build_validate_and_deploy:
256283
when:
257284
equal: ["", << pipeline.parameters.cleanup_preview_branch >>]
@@ -265,13 +292,28 @@ workflows:
265292
filters:
266293
branches:
267294
ignore: main
268-
context: circleci-docs-static
295+
context:
296+
[
297+
circleci-docs-static,
298+
docs-platform-assets,
299+
web-ui-npm,
300+
web-ui-datadog,
301+
]
269302
- deploy-production:
270303
requires: [validate]
271304
filters:
272305
branches:
273306
only: main
274-
context: circleci-docs-static
307+
context:
308+
[
309+
circleci-docs-static,
310+
docs-platform-assets,
311+
web-ui-npm,
312+
web-ui-datadog,
313+
]
314+
bucket_dir: "dorian"
315+
bucket_name: "circleci-docs-platform-assets/docs"
316+
build_dir: "build"
275317
cleanup_preview:
276318
when: pipeline.parameters.cleanup_preview_branch != ""
277319
jobs:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ ui/node_modules/
77
ui/public/
88
ui/**/.DS_Store
99
extensions/.temp
10-
.env
10+
.env
11+
.vscode/

.vale.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
StylesPath = styles
2+
3+
Vocab = Docs
4+
5+
MinAlertLevel = suggestion
6+
7+
Packages = Readability
8+
9+
[asciidoctor]
10+
# attribute = value
11+
#
12+
# where 'YES' enables and 'NO' disables.
13+
14+
# enable
15+
experimental = YES
16+
17+
# assign a specific value
18+
attribute-missing = drop
19+
20+
[*.adoc]
21+
BasedOnStyles = circleci-docs, Vale, Readability, Openly

DEVELOPMENT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ The site will be available at `http://localhost:3000` by default.
8484
npm run build:docs
8585
```
8686

87-
- **Fetch server branches** (for server admin docs). You will need to have local copies of all server-* branches to be able to build the full docs site locally:
87+
- **Fetch server branches** (for server admin docs). You will need to have local copies of all server-4* branches to be able to build the full docs site locally:
8888
```bash
8989
npm run fetch-server-branches
9090
```
9191

92-
- **Force fetch server branches** if you want to force all your server-* branches to the state of the upstream "current" versions, use the --force flag. This is recommended if you have no local changes on any server-* branch:
92+
- **Force fetch server branches** if you want to force all your server-4* branches to the state of the upstream "current" versions, use the --force flag. This is recommended if you have no local changes on any server-4* branch:
9393

9494
```bash
9595
npm run fetch-server-branches --force
@@ -257,7 +257,7 @@ When changes are made to the main branch to the build processes, the UI, or all
257257
3. Run `git rebase main`
258258
4. Push those changes with `git push --force-with-lease origin server-4.1` - remember to use the correct server branch number.
259259

260-
This should be done for every server-* branch.
260+
This should be done for every server-4* branch.
261261

262262
### Creating a New Component
263263

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This technical documentation consists of several specialized files:
4141
cd circleci-docs-static
4242
npm ci
4343
```
44-
2. **Make sure you've cloned server-* branches (Server Administration Docs)**
44+
2. **Make sure you've cloned server-4* branches (Server Administration Docs)**
4545

4646
```bash
4747
npm run fetch-server-branches

antora-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ content:
1616
start_path: docs/orbs
1717
- url: .
1818
start_path: docs/server-admin
19-
branches: [server-*]
19+
branches: [server-4*]
2020
- url: .
2121
start_path: docs/contributors
2222
ui:

custom-template.hbs

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf8" />
6+
<title>{{title}}</title>
7+
<!-- needed for adaptive design -->
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<style>
10+
body {
11+
padding: 0;
12+
margin: 0;
13+
}
14+
15+
/* Custom logo styling - properly centered and clickable */
16+
.custom-logo {
17+
position: fixed;
18+
top: 15px;
19+
left: 15px;
20+
z-index: 1001;
21+
padding: 12px; /* Equal padding on all sides */
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
width: fit-content;
26+
transition: all 0.2s ease;
27+
}
28+
29+
.custom-logo a:hover {
30+
transform: translateY(-1px);
31+
}
32+
33+
.custom-logo img {
34+
height: 32px;
35+
width: auto;
36+
display: block;
37+
}
38+
39+
/* Adjust sidebar to avoid logo overlap */
40+
.menu-content {
41+
padding-top: 70px !important;
42+
}
43+
44+
/* Hide logo on very small screens to avoid clutter */
45+
@media (max-width: 480px) {
46+
.custom-logo {
47+
display: none;
48+
}
49+
}
50+
51+
/* Adjust for medium screens */
52+
@media (max-width: 768px) {
53+
.custom-logo {
54+
position: relative;
55+
top: 0;
56+
left: 0;
57+
margin: 15px auto;
58+
display: block;
59+
text-align: center;
60+
max-width: none;
61+
width: fit-content;
62+
padding: 15px 20px;
63+
}
64+
65+
.menu-content {
66+
padding-top: 20px !important;
67+
}
68+
}
69+
</style>
70+
{{{redocHead}}}
71+
{{#unless disableGoogleFont}}<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">{{/unless}}
72+
</head>
73+
74+
<body>
75+
<!-- Clickable logo that routes to docs homepage -->
76+
<div class="custom-logo">
77+
<a href="../../reference/api-homepage.html" title="Back to CircleCI Documentation">
78+
<img src="logo.svg" alt="CircleCI" />
79+
</a>
80+
</div>
81+
82+
{{{redocHTML}}}
83+
</body>
84+
85+
</html>

docs/guides/modules/about-circleci/pages/about-circleci.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ image::guides:ROOT:circleci-system-diagram.png[CircleCI process diagram]
1515
[#what-is-ci-cd]
1616
== What is CI/CD?
1717

18-
*Continuous integration (CI)* is a practice that integrates code into a chosen branch of a shared repository, early and often. Instead of building out features in isolation and integrating them at the end of a development cycle, code is integrated with the shared repository by developers multiple times throughout the day by committing daily to a shared mainline. Every commit triggers automated tests and builds. If these fail, they can be repaired quickly.
18+
*Continuous integration (CI)* is a practice that integrates code into a chosen branch of a shared repository, early and often. Instead of building out features in isolation and integrating them at the end of a development cycle, code is integrated with the shared repository multiple times throughout the day. Every commit to a shared mainline triggers automated tests and builds. If these fail, they can be repaired quickly.
1919

2020
*Continuous delivery (CD)* is a practice that produces reliable releases to a chosen development environment, like a staging or production branch.
2121

gulp.d/tasks/build-api-docs.js

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,50 @@ function buildApiV2(callback) {
183183
// STEP 6: Build final HTML documentation
184184
// Redocly transforms the OpenAPI spec into beautiful, interactive docs
185185
console.log('🏗️ Building docs with Redocly CLI...')
186-
exec('npx @redocly/cli build-docs build/temp-api-v2/openapi-final.json --output build/api/v2/index.html', (err, stdout, stderr) => {
186+
187+
// Build options for enhanced customization (all free options):
188+
// --title: Custom page title
189+
// --theme.openapi.disableSearch: Disable search (if needed)
190+
// --theme.openapi.hideDownloadButton: Hide download button
191+
// --template: Custom template (requires template file)
192+
// --options.maxDisplayedEnumValues: Limit enum display
193+
194+
const buildCommand = [
195+
'npx @redocly/cli build-docs build/temp-api-v2/openapi-final.json',
196+
'--output build/api/v2/index.html',
197+
'--config redocly.yaml',
198+
'--template custom-template.hbs',
199+
'--title "CircleCI API v2 Documentation"',
200+
'--disableGoogleFont=false',
201+
// Additional options for free version:
202+
// '--theme.openapi.hideDownloadButton=true',
203+
// '--theme.openapi.disableSearch=true',
204+
// '--theme.openapi.nativeScrollbars=true'
205+
].join(' ')
206+
207+
exec(buildCommand, (err, stdout, stderr) => {
187208
if (err) {
188209
console.error('❌ Failed to build API docs:', err)
189210
return callback(err)
190211
}
191212

192213
console.log('✅ API v2 docs built successfully')
193214

194-
// STEP 7: Cleanup temporary files
195-
// Remove intermediate files to keep build directory clean
196-
exec('rm -rf build/temp-api-v2', () => {
197-
console.log('🎉 API v2 documentation build completed!')
198-
callback()
215+
// STEP 7: Copy logo file for template
216+
console.log('📋 Copying logo file...')
217+
exec('cp logo.svg build/api/v2/', (err) => {
218+
if (err) {
219+
console.warn('⚠️ Warning: Could not copy logo file:', err.message)
220+
} else {
221+
console.log('✅ Logo file copied successfully')
222+
}
223+
224+
// STEP 8: Cleanup temporary files
225+
// Remove intermediate files to keep build directory clean
226+
exec('rm -rf build/temp-api-v2', () => {
227+
console.log('🎉 API v2 documentation build completed!')
228+
callback()
229+
})
199230
})
200231
})
201232
})

logo.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)