Skip to content

Commit a8e89bf

Browse files
Merge branch 'main' into nguyenalex836-remove-unnecessary-spaces-1
2 parents 13d4033 + ec8b727 commit a8e89bf

File tree

2,022 files changed

+22565
-18050
lines changed

Some content is hidden

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

2,022 files changed

+22565
-18050
lines changed

.devcontainer/devcontainer.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
// Set *default* container specific settings.json values on container create.
2020
"settings": {
2121
"terminal.integrated.shell.linux": "/bin/bash",
22-
"cSpell.language": ",en"
22+
"cSpell.language": ",en",
23+
"git.autofetch": true
2324
},
2425
// Visual Studio Code extensions which help authoring for docs.github.com.
2526
"extensions": [
@@ -57,7 +58,7 @@
5758
},
5859

5960
// Use 'postCreateCommand' to run commands after the container is created.
60-
"postCreateCommand": "npm ci",
61+
"postCreateCommand": "npm ci && npm start",
6162

6263
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
6364
"remoteUser": "node",

.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
version: 2
2+
registries:
3+
ghcr: # Define access for a private registry
4+
type: docker-registry
5+
url: ghcr.io
6+
username: PAT
7+
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}
28
updates:
39
- package-ecosystem: npm
410
directory: '/'
@@ -23,11 +29,18 @@ updates:
2329
- dependency-name: '*'
2430
update-types:
2531
['version-update:semver-patch', 'version-update:semver-minor']
32+
- dependency-name: 'github/internal-actions'
2633

2734
- package-ecosystem: 'docker'
35+
registries:
36+
- ghcr
2837
directory: '/'
2938
schedule:
3039
interval: weekly
3140
day: thursday
41+
groups:
42+
baseImages:
43+
patterns:
44+
- '*'
3245
ignore:
3346
- dependency-name: 'node'

.github/workflows/azure-preview-env-deploy-public.yml

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ jobs:
123123
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
124124
with:
125125
context: .
126+
file: Dockerfile.azure
126127
push: true
127128
target: preview
128129
tags: ${{ env.DOCKER_IMAGE }}

.github/workflows/azure-preview-env-deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ jobs:
174174
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
175175
with:
176176
context: .
177+
file: Dockerfile.azure
177178
push: true
178179
target: ${{ steps.with-translations.outputs.result == 'true' && 'production' || 'preview' }}
179180
tags: ${{ env.DOCKER_IMAGE }}

.github/workflows/azure-prod-build-deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
105105
with:
106106
context: .
107+
file: Dockerfile.azure
107108
push: true
108109
target: production
109110
tags: ${{ env.DOCKER_IMAGE }}, ${{ env.DOCKER_IMAGE_CACHE_REF }}

.github/workflows/azure-staging-build-deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
9595
with:
9696
context: .
97+
file: Dockerfile.azure
9798
push: true
9899
target: production
99100
tags: ${{ env.DOCKER_IMAGE }}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
schedule:
2020
- cron: '20 16 * * *' # Run every 24 hours at 20 minutes past the hour
2121
workflow_run:
22-
workflows: ['Azure Production - Build and Deploy']
22+
workflows: ['Purge Fastly']
2323
types:
2424
- completed
2525

.github/workflows/main-preview-docker-cache.yml

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
7272
with:
7373
context: .
74+
file: Dockerfile.azure
7475
push: true
7576
target: preview
7677
tags: ${{ env.DOCKER_IMAGE_CACHE_REF }}

.github/workflows/moda-ci.yaml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: docs-internal Moda CI
2+
3+
# More info on CI actions setup can be found here:
4+
# https://github.com/github/ops/blob/master/docs/playbooks/build-systems/moving-moda-apps-from-bp-to-actions.md
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches-ignore:
10+
- 'gh-readonly-queue/**'
11+
merge_group:
12+
types: [checks_requested]
13+
14+
jobs:
15+
##########################
16+
# Generate Vault keys
17+
##########################
18+
set-vault-keys:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
modified_vault_keys: ${{ steps.modify_vault_keys.outputs.modified }}
22+
steps:
23+
- name: Set vault-keys output
24+
id: modify_vault_keys
25+
run: |
26+
if [ -z "${{ vars.VAULT_KEYS }}" ]; then
27+
# We want to add the DOCS_BOT_PAT_READPUBLICKEY to the list of keys
28+
# so that builds fetch the secret from the docs-internal vault
29+
# where --environment is "ci"
30+
echo "modified=DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT
31+
else
32+
echo "modified=${{ vars.VAULT_KEYS }},DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT
33+
fi
34+
35+
#############
36+
# Moda jobs
37+
#############
38+
moda-config-bundle:
39+
if: ${{ github.repository == 'github/docs-internal' }}
40+
name: ${{ matrix.ci_job.job }}
41+
needs: set-vault-keys
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
ci_job: [{ 'job': 'docs-internal-moda-config-bundle' }]
46+
uses: github/internal-actions/.github/workflows/moda.yml@main
47+
with:
48+
ci-formatted-job-name: ${{ matrix.ci_job.job }}
49+
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
50+
secrets:
51+
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
52+
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
53+
54+
#############
55+
# Docker Image jobs
56+
#############
57+
docker-image:
58+
if: ${{ github.repository == 'github/docs-internal' }}
59+
name: ${{ matrix.ci_job.job }}
60+
needs: set-vault-keys
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
ci_job: [{ 'job': 'docs-internal-docker-image' }]
65+
uses: github/internal-actions/.github/workflows/kube.yml@main
66+
with:
67+
ci-formatted-job-name: ${{ matrix.ci_job.job }}
68+
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
69+
# Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=<PAT value>
70+
docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY'
71+
secrets:
72+
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
73+
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
74+
75+
#############
76+
# Docker Security jobs
77+
#############
78+
docker-security:
79+
if: ${{ github.repository == 'github/docs-internal' }}
80+
name: ${{ matrix.ci_job.job }}
81+
needs: set-vault-keys
82+
strategy:
83+
fail-fast: false
84+
matrix:
85+
ci_job: [{ 'job': 'docs-internal-docker-security' }]
86+
uses: github/internal-actions/.github/workflows/docker_security.yml@main
87+
with:
88+
ci-formatted-job-name: ${{ matrix.ci_job.job }}
89+
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
90+
# Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=<PAT value>
91+
docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY'
92+
secrets:
93+
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
94+
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
95+
96+
permissions:
97+
actions: read
98+
checks: read
99+
contents: read
100+
statuses: read
101+
id-token: write

.github/workflows/notify-about-deployment.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ name: Notify about production deployment
77
on:
88
workflow_dispatch:
99
workflow_run:
10-
# Note, we could do this after the "Purge Fastly" finished
11-
workflows: ['Azure Production - Build and Deploy']
10+
workflows: ['Purge Fastly']
1211
types:
1312
- completed
1413

.github/workflows/purge-fastly.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ on:
1616
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
1717
required: false
1818
default: ''
19-
workflow_run:
20-
workflows: ['Azure Production - Build and Deploy']
21-
types:
22-
- completed
19+
push:
20+
branches:
21+
- main
2322

2423
permissions:
2524
contents: read
@@ -43,6 +42,23 @@ jobs:
4342

4443
- uses: ./.github/actions/node-npm-setup
4544

45+
- name: Wait for production to match build number
46+
run: |
47+
needs=$(git rev-parse HEAD)
48+
start_time=$(date +%s)
49+
timeout_seconds=1200
50+
while [[ $needs != $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
51+
do
52+
if [[ $(($(date +%s) - $start_time)) -gt $timeout_seconds ]]
53+
then
54+
echo "Production did not match the build number within $timeout_seconds seconds"
55+
exit 1
56+
fi
57+
echo "Production is not up to date with the build commit"
58+
sleep 10
59+
done
60+
echo "Production is up to date with the build commit"
61+
4662
- name: Purge Fastly edge cache independent of language
4763
if: ${{ inputs.nuke_all }}
4864
run: npm run purge-fastly-edge-cache

0 commit comments

Comments
 (0)