Skip to content

Commit 61ad465

Browse files
Merge branch 'main' into patch-1
2 parents 7edbd32 + 3f5ac3d commit 61ad465

1,073 files changed

Lines changed: 89847 additions & 71274 deletions

File tree

Some content is hidden

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

.devcontainer/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# To find available Node images, see https://mcr.microsoft.com/en-us/product/devcontainers/javascript-node/tags
2-
3-
# [Choice] Node.js version
4-
ARG VARIANT="dev-24-bullseye"
5-
FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT}
2+
ARG VARIANT=dev-24-bullseye
3+
FROM mcr.microsoft.com/devcontainers/javascript-node:dev-24-bullseye@sha256:3502f1f21b1989500e8c72ada7d6e496dc4540b0707d4ea4ff743077f88a6c2d

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
// Lifecycle commands
6565
// Start a web server and keep it running
66-
"postStartCommand": "nohup bash -c 'npm start &'",
66+
"postStartCommand": "nohup bash -c 'npm ci && npm start &'",
6767
// Set port 4000 to be public
6868
"postAttachCommand": "gh cs ports visibility 4000:public -c \"$CODESPACE_NAME\"",
6969

.github/workflows/index-general-search.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ on:
2626
permissions:
2727
contents: read
2828

29-
# This allows a subsequently queued workflow run to cancel previous runs
29+
# This allows a subsequently queued workflow run to cancel previous runs.
30+
# Include the triggering workflow's conclusion in the group so that runs triggered
31+
# by skipped Purge Fastly workflows don't cancel runs triggered by successful ones.
3032
concurrency:
31-
group: '${{ github.workflow }} @ ${{ github.head_ref }} ${{ github.event_name }}'
33+
group: '${{ github.workflow }} @ ${{ github.head_ref }} ${{ github.event_name }} ${{ github.event.workflow_run.conclusion }}'
3234
cancel-in-progress: true
3335

3436
env:
@@ -40,7 +42,9 @@ env:
4042

4143
jobs:
4244
figureOutMatrix:
43-
if: ${{ github.repository == 'github/docs-internal' }}
45+
# Skip immediately if triggered by a non-successful Purge Fastly run.
46+
# This prevents skipped runs from canceling valid indexing runs via concurrency.
47+
if: ${{ github.repository == 'github/docs-internal' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
4448
runs-on: ubuntu-latest
4549
outputs:
4650
matrix: ${{ steps.set-matrix.outputs.result }}
@@ -55,11 +59,13 @@ jobs:
5559
const allPossible = ["en", ...allNonEnglish]
5660
5761
if (context.eventName === "workflow_run") {
62+
// Job-level `if` already ensures we only get here for successful runs,
63+
// but keep this as a safety check.
5864
if (context.payload.workflow_run.conclusion === "success") {
5965
return ["en"]
6066
}
61-
console.warn(`NOTE! It was a workflow_run but not success ('${context.payload.workflow_run.conclusion}')`)
62-
console.warn("This means we're not going to index anything in the next dependent step.")
67+
// This shouldn't happen due to job-level filter, but handle gracefully.
68+
console.warn(`Unexpected: workflow_run with conclusion '${context.payload.workflow_run.conclusion}'`)
6369
return []
6470
}
6571

.github/workflows/link-check-daily.yml

Lines changed: 0 additions & 106 deletions
This file was deleted.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Check External Links
2+
3+
# Runs weekly (Wednesday) at 16:20 UTC
4+
# Validates external URLs in content files
5+
6+
on:
7+
schedule:
8+
- cron: '20 16 * * 3' # Wednesday at 16:20 UTC
9+
workflow_dispatch:
10+
inputs:
11+
max_urls:
12+
description: 'Maximum number of URLs to check (leave blank for all)'
13+
type: number
14+
15+
permissions:
16+
contents: read
17+
issues: write
18+
19+
jobs:
20+
check-external-links:
21+
if: github.repository == 'github/docs-internal'
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 180 # 3 hours for external checks
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
28+
- uses: ./.github/actions/node-npm-setup
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Check external links
34+
env:
35+
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
36+
CACHE_MAX_AGE_DAYS: '7'
37+
run: |
38+
if [[ -n "${{ inputs.max_urls }}" ]]; then
39+
npm run check-links-external -- --max ${{ inputs.max_urls }}
40+
else
41+
npm run check-links-external
42+
fi
43+
44+
- name: Upload report artifact
45+
if: always()
46+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
47+
with:
48+
name: external-link-report
49+
path: artifacts/external-link-report.*
50+
retention-days: 14
51+
if-no-files-found: ignore
52+
53+
- name: Check if report exists
54+
if: always()
55+
id: check_report
56+
run: |
57+
if [ -f "artifacts/external-link-report.md" ]; then
58+
echo "has_report=true" >> $GITHUB_OUTPUT
59+
else
60+
echo "has_report=false" >> $GITHUB_OUTPUT
61+
echo "No broken link report generated - all links valid!"
62+
fi
63+
64+
- name: Create issue if broken links found
65+
if: always() && steps.check_report.outputs.has_report == 'true'
66+
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v5
67+
with:
68+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
69+
repository: github/docs-content
70+
title: '🌐 Broken External Links Report'
71+
content-filepath: artifacts/external-link-report.md
72+
labels: broken link report
73+
74+
- uses: ./.github/actions/slack-alert
75+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
76+
with:
77+
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
78+
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

0 commit comments

Comments
 (0)