-
Notifications
You must be signed in to change notification settings - Fork 11
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
Configure Publishing OSCAL Viewer to GitHub Packages #168
Conversation
Made changes to example/package.json to configure npm publish to push to GitHub packages. Created a GitHub actions script to publish on a push to develop.
Changed the permissions in the GitHub actions for security.
This and the corresponding PR in oscal-rest-service handle setting up GitHub packages as part of the all-in-one deployment. |
@@ -2,7 +2,10 @@ | |||
"name": "oscal-viewer", | |||
"homepage": ".", | |||
"version": "0.1.0", | |||
"private": true, |
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 sure about this change. I thought it needed to be removed in order to publish - can someone clarify what this line was doing or if it's still necessary?
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.
I have a few questions here since we're talking about the example application (not library). I think all of this would be absolutely phenomenal for the React Library at the root but we may want to think about the design a bit for the example app.
- Is it really appropriate to deploy the example app to GitHub Packages? It's more of a static asset after an
npm run build
and we can just deploy theexamples/build
folder directly. Do we really care about the full contents of the NPM package and do those provide us any benefit anyway? Perhaps we'd be better served byactions/upload-artifact
rather than by publishing. Will it provide any benefit inside anode_modules/
folder? I believe we're actually already pushing that as an artifact: https://github.com/EasyDynamics/oscal-react-library/actions/runs/1174249533. - If we're going to go to this effort to publish the example app, should we configure the library to be published to GitHub Packages while we're setting this workflow up? We can always switch to a "real"/default registry like NPM's later but this would let us have a place to pull down snapshot versions of the library.
Removed unnecessary permissions on gh-pages.yml and added the proper permissions to gh-packages.yml
We don't really care about anything but the static output of
Good call. |
Update the Setup Node step in the gh-packages Actions file to cache package dependencies. Co-authored-by: Kyle Laker <klaker@easydynamics.com>
Change the protocol from git:// to https:// in the "repository" field for setting up publishing to the GitHub npm registry. Add a `directory` pointing to the example directory. Co-authored-by: Kyle Laker <klaker@easydynamics.com>
Updated the GitHub actions config and root package.json to configure publishing the React Library to GitHub packages along with the Viewer. This will continously publish the React Library and set things up to eventually publish to a public registry.
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.
Everything looks good to go. Nice work!
Set up package.json and GitHub actions to publish to GitHub packages.