-
Notifications
You must be signed in to change notification settings - Fork 175
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
Build manuscript from a branch different than master #341
Comments
We haven't done that, but it seems feasible with some customization. Could you please tell us more about the workflow you'd like? Then we can point you in the right direction in regards to editing the continuous integration workflow and/or deploy script. I also plan to edit the issue name, if you don't mind. This is a good question. I could see others search for it in the issues. |
@agitter Thanks for your response and for renaming the issue. The workflow I am thinking of is PR > draft-branch > master. Most PRs will be against draft-branch. When a considerable section is built after consolidating work through individual PRs, the section is pushed from draft-branch to master branch. Somewhat analogous to "dev" branch and "prod" branch in case of an app (dev == draft-branch, prod == master). As the sections are being built, it would be great to visualize the layout of the draft-branch and make any necessary changes without the need to push it to the master branch. It may also help the readability of the draft-branch to facilitate the intermediate review processes. |
Thanks for describing your goals. That workflow makes sense. Several Manubot projects use continuous integration artifacts to accomplish similar things. Artifacts are available in GitHub Actions and AppVeyor, but not Travis CI. With either of those services, the continuous integration build on a non-master branch will store PDF and HTML outputs so that you can preview the layout, new references, figures, etc. AppVeyor can also push comments into a pull request with direct links to the updated manuscript artifacts. That is my recommended option if it accomplishes what you're looking for because the setup is easy. It would also keep the "official" versions of your manuscript that are hosted on GitHub pages clean. They would only contain the If you instead want to deploy manuscripts after merging pull requests to |
Thanks @agitter for the solutions... We are going to test out the GH actions artifacts for now. Is there documentation that I could follow to update the build script in case we want to go ahead with deploying the manuscript after PR merge to draft-branch (instead of master)? |
No, there isn't existing documentation because that hasn't been attempted before. We could help you understand the current build process so that you can modify it to meet your needs. If this is for your https://github.com/jaybee84/ml-in-rd/ manuscript, it looks like you are using the GitHub Actions workflow for continuous integration. In that case, you would modify this line of rootstock/.github/workflows/manubot.yaml Line 57 in 8b9b5ce
My first attempt would be to replace I don't see any immediate changes that would be required in the |
Thanks! I will try that and report back .. :) |
It seems that adding "draft-branch" to the manubot yaml did not reflect in the gh-pages updating from the draft-branch (see new yaml) I also added "draft-branch" to the push and PR branch sources in the yaml. That also did not update the gh-pages to reflect the latest merges in the draft-branch. The gh-pages still show the content of the master branch. |
The It may be that the rootstock/.github/workflows/manubot.yaml Lines 44 to 47 in 8b9b5ce
which checks the state of an environment variable instead of the branch. |
I'm closing this per jaybee84/ml-in-rd#34 (comment) It is possible to deploy a manuscript from a different default branch besides @jaybee84 if you want to discuss further customization, you can tag me in jaybee84/ml-in-rd#34 or a new issue in that repo. |
Small tutorial on how to build manuscript from a different branch than the master branch. Goal: Render html and pdf for pushes in other branches than master branch. Discussion goes on at #341. I am using Github Actions for building the manuscript, so I have to make changes to the manubot.yaml file. The yaml file of my project currently mentions the master branch in a few parts: @agitter `s fix was to remove the conditional to branch in Deploy Manuscript, add GITHUB_REF: ${{ github.ref }} add to Deploy Manuscript’s env and change the run to:
And add the other branch to the header. Let’s try that. You can see the changes I made in my commit here The build was triggered (hooray) and is running now here. In the logs, it mentions: It did not, however, push to the output branch, where I had compiled a .docx before, as I was expecting. It did, nevertheless produced the right artifact, so it was a success! (the end) |
Is it possible to power the pdf/html output builds using a branch different than the master? If yes, how should one set that up?
The text was updated successfully, but these errors were encountered: