Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples fixes and preview.astro.new support #12543

Merged
merged 10 commits into from
Nov 27, 2024
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Nov 27, 2024

Changes

  • This PR (partially) fixes support for base in the blog, portfolio, and with-nanostores examples.
    • In the blog and portfolio examples, this fixes the highlighting of the current page in the site navigation components. It doesn’t fix other aspects of these templates to work with base (e.g. image paths etc.) just for simplicity’s sake, but we could in a follow up if we wanted.
    • In the with-nanostores example, this fixes all user-authored links to use a base.
  • This improves the deployments to preview.astro.new, which builds each example with base and then tries to auto-prefix with base when it can, but there are some edge cases it can’t handle, which this PR fixes
  • This PR also adds a new GitHub workflow which runs when pushing to main. It checks to see if anything in the examples/ directory has changed, and if so sends a request to Netlify to redeploy preview.astro.new
  • This workflow requires a new NETLIFY_PREVIEWS_BUILD_HOOK secret adding to this repo. @ematipico added this ✅

Testing

  • Ran the examples locally with and without base set

Docs

n/a bug fix only

Copy link

changeset-bot bot commented Nov 27, 2024

⚠️ No Changeset found

Latest commit: c8d0e30

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added pkg: example Related to an example package (scope) 🚨 action Modifies GitHub Actions labels Nov 27, 2024
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

I didn't checkout the branch to check the UI changes. I left a couple of suggestions for the workflow.

.github/workflows/examples-deploy.yml Outdated Show resolved Hide resolved
.github/workflows/examples-deploy.yml Show resolved Hide resolved
@delucis delucis merged commit 04aede3 into main Nov 27, 2024
14 checks passed
@delucis delucis deleted the chris/examples-tweaks branch November 27, 2024 15:08
delucis added a commit to withastro/preview.astro.new that referenced this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 action Modifies GitHub Actions pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants