-
Notifications
You must be signed in to change notification settings - Fork 3
Add a pipeline to push dev docs on each commit #24
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
Conversation
293dd0a to
8cc747d
Compare
|
Ah, I think I know why the side-by-side checkout didn't work - namely, because the setup composite action checks out the code into the default location, which will overwrite anything checked out into a subfolder. That should be fixable. |
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.
Mostly looks good, but the docs build seems to be relying on a couple of GitLab-specific environment variables. It's not picking up the source commit hash (see here), and we'll presumably run into a similar issue when we go to release because it won't be able to pick up the tag from environment variables either. The relevant stuff in the config file is here -- we could presumably just switch over to the equivalent GitHub environment variables and it will work? Though there might be slight changes in the semantics to watch out for.
a5b3a91 to
789cfb1
Compare
789cfb1 to
4322658
Compare
4322658 to
5bc8b86
Compare
5bc8b86 to
384ef0e
Compare
384ef0e to
7f6d5b1
Compare
|
I've updated this to pull the version and commit information from the github environment variables, and re-ran it pushing to the dasm/test-push branch on the tumult-docs repo. It seems to work - the commit hash gets set in the html pages, and the branch name gets stored in the release and version id files. |
I've tested a version of this that pushes the docs to a branch, you can see the results at https://github.com/opendp/tumult-docs/tree/dasm/test-push
DOCS_REPO_PAT is a personal access token for the opendp-dev account (which is used as a bot - github doesn't have explicit support for service accounts). It is tightly scoped so that it only grants access to the tumult-docs repository. I've also given the opendp-dev account write permissions, and exempted it from the branch protection rule on the main branch of that repository (via a one-member team).
I tried checking out the two repositories side-by-side, but I got some mysterious errors trying to run the setup action when the analytics repository wasn't checkout out into the default location (the action itself completed fine, but I got an error on the "post" step where it complained the yml file was missing). Seems like a bug, I'll probably try to repro it and submit a report.
Fixes #19