Merge branch 'main' into repo-sync
This commit is contained in:
7
.github/workflows/staging-build-pr.yml
vendored
7
.github/workflows/staging-build-pr.yml
vendored
@@ -34,9 +34,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dump full context for debugging
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
run: |
|
||||
cat << EOF
|
||||
${{ toJSON(github) }}
|
||||
EOF
|
||||
|
||||
build-pr:
|
||||
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}
|
||||
|
||||
@@ -34,7 +34,10 @@ export default async function renderPage(req, res, next) {
|
||||
|
||||
// Updating the Last-Modified header for substantive changes on a page for engineering
|
||||
// Docs Engineering Issue #945
|
||||
if (context.page.effectiveDate !== '') {
|
||||
if (context.page.effectiveDate) {
|
||||
// Note that if a page has an invalidate `effectiveDate` string value,
|
||||
// it would be caught prior to this usage and ultimately lead to
|
||||
// 500 error.
|
||||
res.setHeader('Last-Modified', new Date(context.page.effectiveDate).toUTCString())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user