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

GitHub action for building narya in CI #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

olynch
Copy link
Contributor

@olynch olynch commented Nov 26, 2024

This adds a github action for building a static version of narya in CI. It also uploads the build and its dependencies to a cache, so that local builds of narya/future CI builds of narya can simply pull dependencies from cache.

What it should also do is upload the static narya binary somewhere; that is a TODO.

@olynch olynch mentioned this pull request Nov 26, 2024
@mikeshulman
Copy link
Owner

Until we have a github organization, a natural place to put the binaries would be my github.io site. But if the CI scripts store an access token allowing them to upload to there (or anywhere, really), then that token would be publicly accessible to anyone who clones the repository, which doesn't seem very secure. We do this for the HoTT Book but I didn't set that up, so I don't know how it's secured (or even if it is).

I gather the CI can also create a github "release" which has files attached to it, but that doesn't seem correct for development builds that happen with every commit.

@mikeshulman
Copy link
Owner

It would also be nice if the CI could update jsNarya somewhere.

@olynch
Copy link
Contributor Author

olynch commented Nov 27, 2024

Until we have a github organization, a natural place to put the binaries would be my github.io site. But if the CI scripts store an access token allowing them to upload to there (or anywhere, really), then that token would be publicly accessible to anyone who clones the repository, which doesn't seem very secure. We do this for the HoTT Book but I didn't set that up, so I don't know how it's secured (or even if it is).

The CI can have variables which are configured at a repository level, so they won't be in the workflow file and won't be runnable for clones of the repository. So that's not a problem. And I can look into building jsNarya!

@mikeshulman
Copy link
Owner

mikeshulman commented Nov 27, 2024

Where are the variables configured?

Edit: Oh, I see, we want to use secrets.

@mikeshulman
Copy link
Owner

Ah, now I remember: github pages can publish from any repository, not just the dedicated one. That doesn't require any secrets or variables or anything.

https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site

So we can either (1) create a special branch such as gh-pages that contains only the static binary and the jsnarya files, and have the CI push to that branch, or (2) use the special github actions such as https://github.com/actions/upload-pages-artifact to create the site directly from the CI.

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