@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
assets/images/site/evergreens/boxwood.png
Normal file
|
After Width: | Height: | Size: 797 KiB |
BIN
assets/images/site/evergreens/cedar.png
Normal file
|
After Width: | Height: | Size: 566 KiB |
BIN
assets/images/site/evergreens/cypress.png
Normal file
|
After Width: | Height: | Size: 315 KiB |
BIN
assets/images/site/evergreens/fir.png
Normal file
|
After Width: | Height: | Size: 294 KiB |
BIN
assets/images/site/evergreens/hemlock.png
Normal file
|
After Width: | Height: | Size: 600 KiB |
BIN
assets/images/site/evergreens/holly.png
Normal file
|
After Width: | Height: | Size: 470 KiB |
BIN
assets/images/site/evergreens/juniper.png
Normal file
|
After Width: | Height: | Size: 405 KiB |
BIN
assets/images/site/evergreens/laurel.png
Normal file
|
After Width: | Height: | Size: 906 KiB |
BIN
assets/images/site/evergreens/pine.png
Normal file
|
After Width: | Height: | Size: 387 KiB |
BIN
assets/images/site/evergreens/redwood.png
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
assets/images/site/evergreens/sequoia.png
Normal file
|
After Width: | Height: | Size: 622 KiB |
BIN
assets/images/site/evergreens/spruce.png
Normal file
|
After Width: | Height: | Size: 308 KiB |
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||