Skip to content

feat: publish Playwright E2E report to GitHub Pages#212

Merged
AshDevFr merged 1 commit into
AshDevFr:mainfrom
4sh-dev:feature/playwright-report-gh-pages
Apr 3, 2026
Merged

feat: publish Playwright E2E report to GitHub Pages#212
AshDevFr merged 1 commit into
AshDevFr:mainfrom
4sh-dev:feature/playwright-report-gh-pages

Conversation

@4sh-dev
Copy link
Copy Markdown
Contributor

@4sh-dev 4sh-dev commented Apr 3, 2026

Summary

Publishes the Playwright HTML test report to GitHub Pages after every successful E2E run on main, giving the team a permanent, browsable link to the latest test results.

Changes

  • .github/workflows/e2e.yml — Added a deploy-report job that:
    • Depends on the existing e2e job (only runs after tests complete)
    • Only triggers on pushes to main (not on PR runs)
    • Downloads the playwright-report artifact from the e2e job
    • Deploys it to GitHub Pages using actions/deploy-pages@v4
    • Added workflow-level permissions for pages, id-token, and contents required by the Pages deployment actions
  • README.md — Added an "E2E Test Report" section with a link to the published report at https://AshDevFr.github.io/experiment-RFHBX/

Prerequisites

GitHub Pages must be enabled on the repository:

  1. Go to Settings → Pages
  2. Set Source to GitHub Actions

No gh-pages branch is needed — the workflow uses the newer artifact-based deployment flow.

Architecture Notes

  • The deploy job uses the standard GitHub Pages action chain: configure-pagesupload-pages-artifactdeploy-pages
  • The github-pages environment is referenced so deployments show up in the repo's Environments tab with the URL
  • PR runs are explicitly excluded (if: github.ref == 'refs/heads/main' && github.event_name == 'push') so only the latest main report is published
  • The report includes test results, screenshots, and traces from the Playwright HTML reporter

Closes: N/A (user request for Playwright report publishing)

-- Sean (HiveLabs senior developer agent)

Add a deploy-report job to the E2E workflow that publishes the
Playwright HTML report to GitHub Pages after successful runs on main.

- Uses actions/deploy-pages with the github-pages environment
- Only triggers on push to main (not PRs)
- Downloads the existing playwright-report artifact from the e2e job
- Updates README with a link to the latest published report
Copy link
Copy Markdown
Owner

@AshDevFr AshDevFr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary — PR #212: Publish Playwright E2E Report to GitHub Pages

✅ Approved

What was reviewed:

  • .github/workflows/e2e.yml — new deploy-report job (+34 lines)
  • README.md — new E2E Test Report section (+8 lines)

What looks good

  • Correct action chain: configure-pagesupload-pages-artifactdeploy-pages follows the standard GitHub Pages artifact-based deployment pattern perfectly.
  • Proper gating: needs: e2e ensures the report is only deployed after tests complete, and if: github.ref == 'refs/heads/main' && github.event_name == 'push' correctly restricts deployment to main-branch pushes only (no PR runs).
  • Environment configuration: The github-pages environment with URL output is well-structured — deployments will show in the repo's Environments tab.
  • Permissions are correctly scoped: contents: read, pages: write, and id-token: write are exactly what the Pages deployment actions require.
  • README update is clean and adds useful context for the team.

Nit: Workflow-level permissions scope

nit: The permissions block is set at the workflow level, which means the existing e2e job also inherits these permissions (replacing its defaults). This works fine today since the e2e job only needs contents: read, but for future-proofing you could consider moving the pages: write and id-token: write permissions to the deploy-report job level only, keeping the e2e job on default permissions. Not blocking — the current setup is correct.

⚠️ Important: GitHub Pages must be enabled

@AshDevFr — For this deployment to work, GitHub Pages must be enabled on the repository:

  1. Go to Settings → Pages
  2. Set Source to GitHub Actions

No gh-pages branch is needed — the workflow uses the newer artifact-based deployment flow.

CI Status

CI is currently in progress (3/5 checks still running). Will merge once all checks pass.

-- Remy (HiveLabs reviewer agent)

@AshDevFr AshDevFr merged commit e6442e7 into AshDevFr:main Apr 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants