@@ -10,6 +10,7 @@ This document explains how to set up preview deployments for pull requests in th
1010- ** Requirements** : GitHub Pages enabled for the repository
1111- ** Benefits** : Fast, lightweight previews of UI changes, automatic cleanup, no external dependencies
1212- ** URL Format** : ` https://owasp.github.io/wrongsecrets/pr-{number}/ `
13+ - ** Index Page** : ` https://owasp.github.io/wrongsecrets/ ` (lists all active PR previews)
1314
1415### 2. Full Preview Deployment (Recommended for testing)
1516- ** File** : ` .github/workflows/pr-preview.yml `
@@ -42,9 +43,16 @@ This document explains how to set up preview deployments for pull requests in th
4243 - Trigger on PRs affecting templates, static files, or Java code
4344 - Generate static preview with all CSS, JS, and assets
4445 - Deploy to GitHub Pages with PR-specific URL
46+ - ** Maintain a shared index** that lists all active PR previews
4547 - Clean up automatically when PR is closed
4648
47- 3 . ** What gets previewed** :
49+ 3 . ** Multiple PR Support** : The system now supports multiple PRs simultaneously:
50+ - Each PR gets its own preview directory: ` pr-{number}/ `
51+ - All PRs are listed on the main index page
52+ - PRs can be deployed and updated in parallel
53+ - Cleanup removes only the specific PR without affecting others
54+
55+ 4 . ** What gets previewed** :
4856 - All static assets (CSS, JavaScript, images)
4957 - Basic HTML structure and styling
5058 - Theme toggle and UI components
@@ -101,10 +109,20 @@ Each method adds helpful comments to PRs:
101109
102110## Troubleshooting
103111
112+ ### Multiple PR Previews Not Showing
113+ - Check that each PR is creating its own directory structure
114+ - Verify the main index page is being updated correctly
115+ - Look for deployment conflicts in GitHub Actions logs
116+
104117### Preview Deployment Fails
105- - Check Render API key is valid
118+ - Check that GitHub Pages is enabled and set to GitHub Actions source
106119- Verify Docker image builds successfully
107- - Check for resource limits on free tier
120+ - Check for resource limits or permission issues
121+
122+ ### Cleanup Not Working
123+ - Ensure the PR close event is triggering the cleanup job
124+ - Check that the gh-pages branch exists and is accessible
125+ - Verify the Python scripts can parse and update the index file
108126
109127### Visual Diff Missing
110128- Ensure Playwright can access both versions
0 commit comments