-
Notifications
You must be signed in to change notification settings - Fork 1
Static preview support #80
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds support for running a static preview of the app by installing a separate supervisor program and automating builds on commit and container start.
- Introduce a new Supervisor program (
spark-static-preview
) to serve the latest build vianpm run preview
. - Add a
post-commit
script and hook to rebuild the app automatically intopreview-build
. - Wire up
post-commit
execution in bothpostStartCommand.sh
andonCreate.sh
.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.devcontainer/spark.conf | Added a Supervisor program for static preview hosting |
.devcontainer/postStartCommand.sh | Execute the post-commit script once on container start |
.devcontainer/post-commit | New build script that outputs to the preview directory |
.devcontainer/onCreate.sh | Set up Git hook and run initial build for static preview support |
Comments suppressed due to low confidence (2)
.devcontainer/onCreate.sh:34
- Ensure
.devcontainer/post-commit
is executable before creating the hook. For example, runchmod +x .devcontainer/post-commit
to avoid permission issues.
ln -fs $(pwd)/.devcontainer/post-commit .git/hooks/post-commit
@@ -2736,6 +2736,28 @@ | |||
} | |||
} | |||
}, | |||
"node_modules/@rollup/plugin-replace": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package-lock.json
changes are not introduced by this PR. Must be changes that were left uncommitted in the past revisions
For: https://github.com/github/spark/issues/741
Merge after: https://github.com/github/workbench-sdk/pull/403
Support static preview of the app, by keeping a build for the latest commit running on the default
vite preview
port