1
0
mirror of synced 2026-01-08 21:02:10 -05:00

Merge pull request #36993 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2025-03-19 17:41:23 -07:00
committed by GitHub
16 changed files with 51 additions and 24 deletions

View File

@@ -35,13 +35,6 @@ jobs:
steps:
- name: Check out repo's default branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# Picking this number is a "best guess". If we make it too large,
# the checkout will take potentially unnecessariily long.
# This reduces the chance that tj-actions/changed-files has to
# fetch deeper history. But if it needs to, it will.
fetch-depth: 10
- uses: ./.github/actions/node-npm-setup
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -108,23 +101,20 @@ jobs:
# First, gather the URLs that were relevant
- name: Get changed content/data files
if: ${{ github.event_name == 'pull_request' }}
id: changed-files
uses: tj-actions/changed-files@40853de9f8ce2d6cfdc73c1b96f14e22ba44aec4 # v45.0.0
id: changed_files
uses: ./.github/actions/get-changed-files
with:
# No need to escape the file names because we make the output of
# tj-actions/changed-files be set as an environment variable. Not
# as a direct input to the line of bash that uses it.
safe_output: false
files: |
content/**
token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate PR comment
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
if: ${{ github.event_name == 'pull_request' && steps.changed_files.outputs.filtered_changed_files }}
env:
# Make it an environment variable so that its value doesn't need to be escaped.
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
CHANGED_FILES: |-
${{ steps.changed-files.outputs.all_changed_files }}
${{ steps.changed_files.outputs.filtered_changed_files }}
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
REPOSITORY: ${{ github.repository }}

View File

@@ -8,7 +8,7 @@
# ---------------------------------------------------------------
# To update the sha:
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250312-190108-g24a349a95 AS base
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250319-193531-g83d4e6244 AS base
# Install curl for Node install and determining the early access branch
# Install git for cloning docs-early-access & translations repos

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

View File

@@ -30,6 +30,18 @@ const EXCEPTIONS = new Set([
'assets/images/site/apple-touch-icon-60x60.png',
'assets/images/site/apple-touch-icon-72x72.png',
'assets/images/site/apple-touch-icon-76x76.png',
'assets/images/site/evergreens/boxwood.png',
'assets/images/site/evergreens/cedar.png',
'assets/images/site/evergreens/cypress.png',
'assets/images/site/evergreens/fir.png',
'assets/images/site/evergreens/hemlock.png',
'assets/images/site/evergreens/holly.png',
'assets/images/site/evergreens/juniper.png',
'assets/images/site/evergreens/laurel.png',
'assets/images/site/evergreens/pine.png',
'assets/images/site/evergreens/redwood.png',
'assets/images/site/evergreens/sequoia.png',
'assets/images/site/evergreens/spruce.png',
])
function isExceptionPath(imagePath: string) {

View File

@@ -20,9 +20,38 @@ import { useTheme } from 'src/color-schemes/components/useTheme'
type MyAppProps = AppProps & {
isDotComAuthenticated: boolean
languagesContext: LanguagesContextT
stagingName?: string
}
const MyApp = ({ Component, pageProps, languagesContext }: MyAppProps) => {
const stagingNames = new Set([
'boxwood',
'cedar',
'cypress',
'fir',
'hemlock',
'holly',
'juniper',
'laurel',
'pine',
'redwood',
'sequoia',
'spruce',
])
function getFaviconHref(stagingName?: string) {
/* The value in these "/cb-xxxxx" prefixes aren't important. They
just need to be present. They help the CDN cache the asset
for infinity.
Just remember, if you edit these images on disk, remember to
change these numbers
*/
if (stagingName) {
return `/assets/cb-345/images/site/evergreens/${stagingName}.png`
}
return '/assets/cb-345/images/site/favicon.png'
}
const MyApp = ({ Component, pageProps, languagesContext, stagingName }: MyAppProps) => {
const { theme } = useTheme()
const router = useRouter()
@@ -89,13 +118,7 @@ const MyApp = ({ Component, pageProps, languagesContext }: MyAppProps) => {
<title>GitHub Docs</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{/* The value in these "/cb-xxxxx" prefixes aren't important. They
just need to be present. They help the CDN cache the asset
for infinity.
Just remember, if you edit these images on disk, remember to
change these numbers
*/}
<link rel="icon" type="image/png" href="/assets/cb-345/images/site/favicon.png" />
<link rel="icon" type="image/png" href={getFaviconHref(stagingName)} />
<link href="/manifest.json" rel="manifest" />
@@ -157,9 +180,11 @@ MyApp.getInitialProps = async (appContext: AppContext) => {
}
}
}
const stagingName = req.headers['x-ong-external-url']?.match(/staging-(\w+)\./)?.[1]
return {
...appProps,
languagesContext,
stagingName: stagingNames.has(stagingName) ? stagingName : undefined,
}
}