diff --git a/.github/workflows/staging-build-pr.yml b/.github/workflows/staging-build-pr.yml index 50f050f9cc..5233e85ffe 100644 --- a/.github/workflows/staging-build-pr.yml +++ b/.github/workflows/staging-build-pr.yml @@ -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' }} diff --git a/middleware/render-page.js b/middleware/render-page.js index 1fe891d68c..a082920d6a 100644 --- a/middleware/render-page.js +++ b/middleware/render-page.js @@ -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()) }