-
-
Notifications
You must be signed in to change notification settings - Fork 360
Use Travis CI to test the book build and then deploy it to the site, take 2 #316
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
Now that Travis has been activated, you can see that the |
Ok. I think we are ready to give this another go, but I would like for @berquist to be available when we merge this PR just in case... So maybe we should set up a time to give this a shot on discord? |
Sure. I won't be around Monday EST, but any time from Tuesday EST on is fine. In the meantime, read the first paragraph again. This PR needs to be updated before merging, otherwise the site will break. |
Mind if I add a WIP to the title to reflect this? |
So to be clear: you are arguing there are a lot of extra files because...
I'm up for updating the update_site command. What do we need to do with the CNAME stuff? |
Uncommenting this line will take care of CNAME. I still need time to check the rest of the files. However, there is a new problem: https://travis-ci.org/algorithm-archivists/algorithm-archive/builds/409608474#L427. If you go to https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions:
I need to figure out if the AAA will be affected by this. I think so, because I am on another org's repo, but for some reason this PR ran fine? It will take some investigation. Maybe later this week is best. |
Oh man, this is getting super messy. Take your time. We really appreciate it! |
Hey @berquist, quick question on the state of this PR. Obviously, no pressure to finish, but I just wanted to make sure it was still on the table. |
I started work recently so have been busy. I'll take a look at it tomorrow and let you know when it's ready to merge. |
Of course no rush, just checking in |
Can you do me a favor and try restarting Travis? I don't understand the sudden failure. https://travis-ci.org/algorithm-archivists/algorithm-archive/builds/432252148 |
I'll be honest, I have no idea how to do that. |
No, I see what you see |
@leios are you signed in to Travis? |
Yeah, alright. That was it. I logged in and could restart it. Sorry. |
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.
This is black magic to me. Let's see if it works.
Continuation of #284.
Don't merge this yet, because things need to be added.
The last PR failed in three ways:
The site went down because the CNAME for custom domain redirection was not present. After checking the log (which I saved), if you're curious, I noticed that there are several other files present in algorithm-archivists.github.io that do not come from either the main repo or building the book. These can persist because
update_site.sh
only copies files over, rather than wipe and move. This is personal preference, but I think the website repo should be entirely reproducible from the main repo via this script. You can see the difference by comparing your website repo with mine. Let me know which path you'd rather take, and I'll either need to add those files to the main repo and have them copy over during deploy, or have the deploy copy the build rather than wipe the book repo.The guard for when the book should be deployed was wrong. Once the initial PR was merged, every Travis
pull_request
build (see below) was going to try deploy. This is before the merge actually happens. I don't think Travis would continue to this step if the build failed earlier, but it's still wrong.A bunch of files got deleted. I still don't know how this happened, because I think they should have been present in the book build. I don't think they were extra files left over from before the flattening, either.
For reference, and because I didn't understand it for a while, there are two kinds of Travis builds:
push
:Travis CI - Branch
andcontinuous-integration/travis-ci/push
.pull_request
:Travis CI - Pull Request
andcontinuous-integration/travis-ci/pr
.The reason each type of CI run appears twice is that the former leads to the pretty GitHub summary, and the latter leads to the actual Travis log.
The config is now set up so that only
push
commits to master will deploy to algorithm-archivists.github.io. I checked, and this works in all cases: when there's a merge commit, a rebase and FF merge, a squash and merge, or a regular commit. Any time the history of master is updated, the book will be built and deployed.Note that I changed the names of some environment variables you must set in Travis to be more explicit. Hopefully things are clearer now.