Skip to content

Commit c407be5

Browse files
Merge branch 'main' into marcospereira/merge-branch-server-4.8
* main: (108 commits) chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.4.0 (#9497) fix(deps): update aws-sdk-go-v2 monorepo (#9494) chore(deps): update cimg/go docker tag to v1.25 (#9492) chore(deps): update dependency stylelint-config-standard to v39 (#9477) fix(deps): update tailwindcss monorepo to v4.1.12 (#9498) Update audit-logs.adoc (#9491) chore(deps): update dependency cssnano to ~7.1.0 (#9470) fix(deps): update fontsource monorepo to v5.2.6 (#9467) fix(deps): update tailwindcss monorepo to v4.1.11 (#9468) chore(deps): update dependency eslint to ~9.33.0 (#9493) chore(deps): update dependency @redocly/cli to v2.0.5 (#9486) chore(deps): update dependency eslint-plugin-import to ~2.32.0 (#9471) Commit updated package-lock (#9484) Documenting CLI trigger-oriented command (#9487) Remove redirects for deleted pages (#9485) Deploys docs improvements (#9476) Fix algolia indexing skipping (#9482) Use trailing slashes on all relativised URLs (#9481) Link to mac IP ranges from execution (#9469) Re-activate deploy (#9466) ...
2 parents 38f12f0 + 96068ae commit c407be5

File tree

134 files changed

+13721
-1749
lines changed

Some content is hidden

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

134 files changed

+13721
-1749
lines changed

.circleci/config.yml

Lines changed: 48 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
version: 2.1
22

3-
parameters:
4-
cleanup_preview_branch:
5-
type: string
6-
default: ""
7-
83
orbs:
94
aws-cli: circleci/[email protected]
105
vale: circleci/[email protected]
6+
go: circleci/[email protected]
117

128
executors:
139
node_executor:
1410
docker:
15-
- image: cimg/node:22.15.1
11+
- image: cimg/node:22.18.0
12+
working_directory: ~/project
13+
14+
go_executor:
15+
docker:
16+
- image: cimg/go:1.25
1617
working_directory: ~/project
1718

1819
ruby_executor:
1920
docker:
20-
- image: cimg/ruby:3.4
21+
- image: cimg/ruby:3.4.5
2122
working_directory: ~/project
2223

2324
commands:
@@ -28,25 +29,6 @@ commands:
2829
aws_secret_access_key: ${AWS_SECRET_ACCESS_KEY}
2930
region: ${AWS_REGION}
3031

31-
sanitize-branch:
32-
steps:
33-
- run:
34-
name: Sanitize Branch Name
35-
command: |
36-
if [ -n "<< pipeline.parameters.cleanup_preview_branch >>" ]; then
37-
BRANCH_TO_USE="<< pipeline.parameters.cleanup_preview_branch >>"
38-
echo "[INFO] Using provided branch param: ${BRANCH_TO_USE}"
39-
else
40-
BRANCH_TO_USE="${CIRCLE_BRANCH}"
41-
echo "[INFO] Using current branch: ${BRANCH_TO_USE}"
42-
fi
43-
44-
# Replace forward-slashes and spaces with double underscore
45-
SANITIZED_BRANCH=$(echo "${BRANCH_TO_USE}" | tr '/ ' '__')
46-
echo "[INFO] Sanitized branch: ${SANITIZED_BRANCH}"
47-
echo "export SANITIZED_BRANCH=${SANITIZED_BRANCH}" >> $BASH_ENV
48-
source $BASH_ENV
49-
5032
notify_error:
5133
parameters:
5234
message:
@@ -77,31 +59,16 @@ jobs:
7759
- "SHA256:Plac654CPBty6yA26H7QMKCqM0yD1XWds7UwNqOYzJU"
7860
- run:
7961
name: Install Node Dependencies
80-
command: |
81-
set -e
82-
echo "[INFO] Installing Node dependencies..."
83-
npm ci
62+
command: npm ci
8463
- run:
8564
name: Build the Documentation Site with Antora
8665
command: |
8766
set -e
8867
echo "[INFO] Starting Antora build..."
8968
npm run build:docs
9069
echo "[INFO] Antora build completed."
91-
- run:
92-
name: Create ZIP Archive of Build
93-
command: |
94-
set -e
95-
echo "[INFO] Creating zip archive of build directory..."
96-
zip -r build.zip build/
9770
- store_artifacts:
98-
path: build.zip
99-
destination: preview-site.zip
100-
- persist_to_workspace:
101-
root: .
102-
paths:
103-
- build
104-
- build.zip
71+
path: build
10572
- persist_to_workspace:
10673
root: .
10774
paths:
@@ -110,190 +77,64 @@ jobs:
11077
message: "Build job failed for branch ${CIRCLE_BRANCH}"
11178

11279
validate:
113-
executor: ruby_executor
80+
executor: go_executor
11481
steps:
82+
- checkout
11583
- attach_workspace:
11684
at: .
117-
- run:
118-
name: Install HTML Proofer
119-
command: |
120-
set -e
121-
echo "[INFO] Installing HTML Proofer gem..."
122-
sudo gem install html-proofer
123-
- run:
124-
name: Run HTML Proofer Validation
125-
command: |
126-
set -e
127-
echo "[INFO] Validating built site with HTML Proofer..."
128-
htmlproofer ./build --checks html --ignore-urls "/#.*/" --ignore-empty-alt
85+
- go/with-cache:
86+
golangci-lint: true
87+
steps:
88+
- run: task mod-download
89+
- run: task ci:diff
90+
- run: task ci:lint
91+
- run: task validate-html
12992
- notify_error:
13093
message: "Validation job failed for branch ${CIRCLE_BRANCH}"
13194

132-
deploy-preview:
133-
executor: node_executor
134-
steps:
135-
- attach_workspace:
136-
at: .
137-
- sanitize-branch
138-
- run:
139-
name: Install GitHub CLI
140-
command: |
141-
set -e
142-
echo "[INFO] Installing GitHub CLI..."
143-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
144-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
145-
sudo apt update
146-
sudo apt install gh
147-
- run:
148-
name: Upload Preview ZIP to GitHub Release and Comment
149-
command: |
150-
set -e
151-
152-
if [[ -n "${CIRCLE_PULL_REQUEST}" ]]; then
153-
PR_NUMBER=$(echo "$CIRCLE_PULL_REQUEST" | sed 's|.*/pull/||')
154-
REPO_PATH="circleci/circleci-docs-static"
155-
TAG="pr-${SANITIZED_BRANCH}"
156-
157-
echo "[INFO] Creating release for PR #${PR_NUMBER} - branch ${SANITIZED_BRANCH} in ${REPO_PATH}"
158-
159-
# Check if release already exists (if re-run)
160-
if gh release view "${TAG}" -R "${REPO_PATH}" > /dev/null 2>&1; then
161-
echo "[INFO] Release already exists. Replacing..."
162-
gh release delete "${TAG}" -R "${REPO_PATH}" --yes
163-
fi
164-
165-
# Create new release and upload ZIP
166-
gh release create "${TAG}" build.zip \
167-
--repo "${REPO_PATH}" \
168-
--title "Preview for PR #${PR_NUMBER}" \
169-
--notes "ZIP artifact for documentation preview." \
170-
--prerelease
171-
172-
DOWNLOAD_URL="https://github.com/${REPO_PATH}/releases/tag/${TAG}/build.zip"
173-
174-
# Comment on the PR with release link
175-
gh pr comment "${PR_NUMBER}" -R "${REPO_PATH}" -b "## Preview Documentation
176-
177-
📦 ZIP preview available here: [Preview Build Assets](${DOWNLOAD_URL})
178-
179-
Build: ${CIRCLE_BUILD_NUM} | Commit: ${CIRCLE_SHA1}"
180-
else
181-
echo "[INFO] Not a PR build, skipping preview release."
182-
fi
183-
- notify_error:
184-
message: "Deploy preview job failed for branch ${CIRCLE_BRANCH}"
185-
18695
deploy-production:
187-
executor: node_executor
188-
parameters:
189-
bucket_name:
190-
description: The name of the s3 bucket where static assets are stored.
191-
type: string
192-
build_dir:
193-
default: "build"
194-
description: The path to the docs build directory
195-
type: string
96+
executor: go_executor
19697
steps:
98+
- checkout
19799
- attach_workspace:
198100
at: .
199101
- aws-setup
200-
- run:
201-
name: Deploy Production Site to S3
202-
command: |
203-
AWS_S3_BUCKET=<< parameters.bucket_name >>
204-
BUILD_DIRECTORY=<< parameters.build_dir >>
205-
206-
set -e
207-
echo "[INFO] Deploying production site..."
208-
aws s3 sync "$BUILD_DIRECTORY" "s3://$AWS_S3_BUCKET/"
102+
- go/with-cache:
103+
steps:
104+
- run: task mod-download
105+
- run: task deploy
106+
- run: task deploy-redirects
107+
- run: task validate-redirects
209108
- notify_error:
210109
message: "Production deployment job failed for branch ${CIRCLE_BRANCH}"
211110

212-
cleanup-preview:
213-
executor: node_executor
214-
steps:
215-
- sanitize-branch
216-
- run:
217-
name: Install GitHub CLI
218-
command: |
219-
set -e
220-
echo "[INFO] Installing GitHub CLI..."
221-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
222-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
223-
sudo apt update
224-
sudo apt install gh
225-
- run:
226-
name: Delete GitHub Release and Tag
227-
command: |
228-
set -e
229-
BRANCH="<< pipeline.parameters.cleanup_preview_branch >>"
230-
REPO_PATH="circleci/circleci-docs-static"
231-
232-
# Extract TAG
233-
TAG="pr-${SANITIZED_BRANCH}"
234-
235-
echo "[INFO] Cleaning up GitHub Release for ${TAG} in ${REPO_PATH}"
236-
237-
# Delete the release if it exists
238-
if gh release view "${TAG}" -R "${REPO_PATH}" > /dev/null 2>&1; then
239-
gh release delete "${TAG}" -R "${REPO_PATH}" --yes
240-
echo "[INFO] Release '${TAG}' deleted."
241-
else
242-
echo "[WARN] Release '${TAG}' not found."
243-
fi
244-
245-
# Delete the tag if it exists
246-
if gh api -X GET "repos/${REPO_PATH}/git/refs/tags/${TAG}" > /dev/null 2>&1; then
247-
gh tag delete "${TAG}" -R "${REPO_PATH}" --yes
248-
echo "[INFO] Tag '${TAG}' deleted."
249-
else
250-
echo "[WARN] Tag '${TAG}' not found."
251-
fi
252-
253111
workflows:
254-
lint:
255-
unless:
256-
equal: [main, << pipeline.git.branch >>]
112+
main:
257113
jobs:
258114
- vale/lint:
259115
reference_branch: main
260116
base_dir: docs
261-
build_validate_and_deploy:
262-
when:
263-
equal: ["", << pipeline.parameters.cleanup_preview_branch >>]
264-
jobs:
117+
filters: pipeline.git.branch != "main"
118+
265119
- build:
266-
context: circleci-docs-static
267-
- validate:
268-
requires: [build]
269-
- deploy-preview:
270-
requires: [validate]
271-
filters:
272-
branches:
273-
ignore: main
120+
filters: pipeline.git.branch == "main"
121+
name: build-main
274122
context:
275-
[
276-
circleci-docs-static,
277-
docs-platform-assets,
278-
web-ui-npm,
279-
web-ui-datadog,
280-
]
123+
- circleci-docs-static
124+
- build:
125+
filters: pipeline.git.branch != "main"
126+
127+
- validate:
128+
requires:
129+
- build-main
130+
- build
131+
281132
- deploy-production:
282-
requires: [validate]
283-
filters:
284-
branches:
285-
only: main
133+
requires:
134+
- validate
135+
filters: pipeline.git.branch == "main"
286136
context:
287-
[
288-
circleci-docs-static,
289-
docs-platform-assets,
290-
web-ui-npm,
291-
web-ui-datadog,
292-
]
293-
bucket_name: "circleci-docs-platform-assets/docs-preview"
294-
build_dir: "build"
295-
cleanup_preview:
296-
when: pipeline.parameters.cleanup_preview_branch != ""
297-
jobs:
298-
- cleanup-preview:
299-
context: circleci-docs-static
137+
- circleci-docs-static
138+
- docs-platform-assets
139+
- web-ui-npm
140+
- web-ui-datadog

.gitignore

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
node_modules/
2-
build/
1+
/node_modules/
2+
/build/
33
**/.DS_Store
4-
ui-bundle.zip
5-
ui/build/
6-
ui/node_modules/
7-
ui/public/
8-
ui/**/.DS_Store
9-
extensions/.temp
10-
.env
11-
.vscode/
4+
/ui-bundle.zip
5+
/ui/build/
6+
/ui/node_modules/
7+
/ui/public/
8+
/ui/**/.DS_Store
9+
/extensions/.temp
10+
/.env
11+
/.vscode/
12+
/.htmltest
13+
/test-reports

.htmltest.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
DirectoryPath: "build"
2+
CheckExternal: false
3+
EnforceHTTPS: true
4+
CheckSelfReferencesAsInternal: true
5+
BaseURL: https://circleci.com/docs
6+
IgnoreAltEmpty: true
7+
IgnoreInternalEmptyHash: true
8+
IgnoreURLs:
9+
- "[url]"
10+
- "[path]"
11+
- "/docs/"
12+
- "/docs/_/img/x-icon.svg"
13+
IgnoreDirs:
14+
- "api"
15+
OutputDir: ".htmltest"

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.18.0

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ There are several ways to contribute to the CircleCI Docs Static Site:
4444
### Initial Setup
4545

4646
1. **Fork the repository**:
47-
- Visit [https://github.com/circleci/circleci-docs-static](https://github.com/circleci/circleci-docs-static)
47+
- Visit [https://github.com/circleci/circleci-docs](https://github.com/circleci/circleci-docs)
4848
- Click the "Fork" button to create your own copy
4949

5050
2. **Clone your fork**:
5151
```bash
52-
git clone https://github.com/YOUR-USERNAME/circleci-docs-static.git
53-
cd circleci-docs-static
52+
git clone https://github.com/YOUR-USERNAME/circleci-docs.git
53+
cd circleci-docs
5454
```
5555

5656
3. **Add the upstream remote**:
5757
```bash
58-
git remote add upstream https://github.com/circleci/circleci-docs-static.git
58+
git remote add upstream https://github.com/circleci/circleci-docs.git
5959
```
6060

6161
4. **Install dependencies**:

DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ This document provides comprehensive guidance for developers working on the Circ
2323

2424
1. **Clone the repository**:
2525
```bash
26-
git clone https://github.com/circleci/circleci-docs-static.git
27-
cd circleci-docs-static
26+
git clone https://github.com/circleci/circleci-docs.git
27+
cd circleci-docs
2828
```
2929

3030
2. **Install dependencies**:

0 commit comments

Comments
 (0)