-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: add github action to publish workflow ui files #1027
Conversation
✅ Deploy Preview for netlify-plugins ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
echo "Installing $PACKAGE" | ||
# remove the quotes from the package name | ||
PACKAGE=$(echo $PACKAGE | tr -d '"') | ||
npm install $PACKAGE |
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.
Is there a reason to install the package vs pulling the file directly from NPM?
We only need raw files, not to pull dependencies and such
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.
nice, will use https://unpkg.com
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.
example being
npm pack $PACKAGE
tar -xf *.tgz
now a package directory will be there with the file contents
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.
Suppose we'll need the whole package for the dynamic scripts and such
This is what I was using currently but I'll use npm pack
instead
curl -s https://unpkg.com/$PACKAGE@latest/workflow-ui.json -o site/$PACKAGE/workflow-ui.json || true
npm install $PACKAGE | ||
if [ -f "node_modules/$PACKAGE/workflow-ui.json" ]; then | ||
echo "Copying workflow-ui.json from $PACKAGE" | ||
cp node_modules/$PACKAGE/workflow-ui.json site/$PACKAGE/workflow-ui.json |
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.
Not blocking but
if you change this to site/workflow-ui/package/$PACKAGE/workflow-ui.json
it would already accomplish the package endpoint
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.
Code is looking solid!
Approving in case you want to address the npm install vs pack logic in a future PR
Add GitHub action to copy
workflow-ui.json
from supporting packages on changes toplugins.json