Skip to content

Conversation

@IsmaelMartinez
Copy link
Owner

  • Add pr-preview.yml workflow to deploy PRs to /pr//
  • Update svelte.config.js to support BASE_PATH env var
  • Remove PR trigger from main deploy.yml

- Add pr-preview.yml workflow to deploy PRs to /pr/<number>/
- Update svelte.config.js to support BASE_PATH env var
- Remove PR trigger from main deploy.yml
@github-actions
Copy link
Contributor

🚀 Preview deployed to https://ismaelmartinez.github.io/model-selector/pr/15/

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables preview deployments for pull requests to separate URLs under /pr/<number>/, allowing reviewers to test changes before merging. The changes separate PR preview builds from main deployments to support different base paths.

  • New workflow for deploying PR previews to dedicated paths
  • Configuration update to support dynamic base paths
  • Removal of PR trigger from main deployment workflow to avoid conflicts

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pr-preview.yml New workflow that builds and deploys PRs to /pr/<number>/ and comments with preview URL
svelte.config.js Adds paths.base configuration to support the BASE_PATH environment variable
.github/workflows/deploy.yml Removes pull_request trigger to prevent duplicate deployments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- name: Build with PR base path
run: npm run build
env:
BASE_PATH: /model-selector/pr/${{ github.event.pull_request.number }}
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

The repository name 'model-selector' is hardcoded in the BASE_PATH. Consider using ${{ github.event.repository.name }} to make this workflow more portable and maintainable across different repositories or repository renames.

Suggested change
BASE_PATH: /model-selector/pr/${{ github.event.pull_request.number }}
BASE_PATH: /${{ github.event.repository.name }}/pr/${{ github.event.pull_request.number }}

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

🚀 Preview deployed to https://IsmaelMartinez.github.io/model-selector/pr/15/

- Switch main deploy to peaceiris/actions-gh-pages
- Add keep_files: true to preserve PR previews and main site
@github-actions
Copy link
Contributor

🚀 Preview deployed to https://IsmaelMartinez.github.io/model-selector/pr/15/

- Remove pr-preview.yml (Vercel handles PR previews automatically)
- Revert deploy.yml to official GitHub Pages method
- Revert svelte.config.js (no BASE_PATH needed)
@IsmaelMartinez IsmaelMartinez deleted the claude/pr-preview-deployment-01HtXyKSmaw9YV5jXF9kpXV5 branch January 10, 2026 09:08
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