Skip to content

Preserve PR preview files in main branch deployment#31

Merged
likeajumprope merged 2 commits intoReproNim:mainfrom
likeajumprope:main
Apr 16, 2026
Merged

Preserve PR preview files in main branch deployment#31
likeajumprope merged 2 commits intoReproNim:mainfrom
likeajumprope:main

Conversation

@likeajumprope
Copy link
Copy Markdown
Collaborator

This pull request introduces a new workflow to automatically deploy and manage preview environments for pull requests, enhancing the review process by allowing reviewers to see live previews of frontend changes. Additionally, a minor update ensures that existing files are retained during deployment to the gh-pages branch.

PR Preview Workflow Automation:

  • Added a new GitHub Actions workflow (.github/workflows/pr-preview.yml) that builds the frontend for each pull request, deploys it to a unique preview directory on the gh-pages branch, and posts a comment with the preview URL on the PR. The workflow also cleans up the preview when the PR is closed.

Deployment Improvements:

  • Updated the main deployment workflow (.github/workflows/deploy.yml) to include keep_files: true in the deploy step, ensuring that existing files on the gh-pages branch are preserved during deployments.

likeajumprope and others added 2 commits April 16, 2026 15:44
Add keep_files: true to peaceiris/actions-gh-pages so that pushes
to main do not wipe the pr-previews/ directory from gh-pages,
allowing PR preview deployments to coexist with production.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@likeajumprope likeajumprope merged commit e3b85ed into ReproNim:main Apr 16, 2026
1 of 3 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the training materials data and the compiled frontend assets. Several issues were identified in the data updates, including inconsistent data types for the course_length field and the introduction of redundant null keys in the JSON data. Additionally, build artifacts from the dist/ directory are being committed to the repository, which should ideally be handled by the CI/CD pipeline and excluded via .gitignore.

Comment thread frontend/dist/index.html
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ReproInventory</title>
<script type="module" crossorigin src="/ReproInventory/assets/index-BfAUm7qF.js"></script>
<script type="module" crossorigin src="/ReproInventory/assets/index-zwxElJ_Y.js"></script>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Build artifacts in the dist/ directory are being committed to the repository. Since the PR description mentions a new GitHub Actions workflow that builds the frontend automatically, these files should be generated during the CI/CD process and not tracked in version control. Tracking build artifacts can lead to unnecessary merge conflicts and repository bloat. It is recommended to add the dist/ directory to .gitignore.

Comment on lines +2326 to +2328
"course_length": [
"1+ weeks"
],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The course_length field for entry ID 60 is being changed to an array ["1+ weeks"], whereas other entries (like ID 58 and 59) use a string value. The frontend filtering logic in training-materials-browser.tsx expects a string for this field, so this inconsistency will likely break the filter for this entry.

    "course_length": "1+ weeks",

Comment on lines +2189 to +2191
"level": null,
"platform": null,
"keywords": null,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

These lines introduce duplicate keys (level, platform, keywords) for entry ID 58. These keys are already defined with actual data later in the same object (starting at line 2199). While most JSON parsers will handle this by taking the last value, it is poor practice and makes the data file harder to maintain. These null assignments should be removed from the source YAML file and the JSON regenerated.

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.

1 participant