1
0
mirror of synced 2026-01-05 03:06:35 -05:00

Merge branch 'main' into repo-sync

This commit is contained in:
Octomerger Bot
2021-11-19 14:50:42 -05:00
committed by GitHub
2 changed files with 8 additions and 4 deletions

View File

@@ -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' }}

View File

@@ -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())
}