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

Deploy devel build of docs to https://nim-lang.github.io/Nim #8992

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

kaushalmodi
Copy link
Contributor

@kaushalmodi kaushalmodi commented Sep 17, 2018

To make this PR functional, @Araq or anyone who has admin rights to this repo will need to get the GitHub API token for repo level permissions from https://github.com/settings/tokens. The token will be visible only once. So once you get it, copy it.

Now go to Travis CI settings in a different browser tab, and create an env var named GITHUB_OAUTH_TOKEN (as that's what this PR uses) and paste that copied token value there. Ensure that this env var value is not made public (by default, it's not public).

/cc @LemonBoy

@kaushalmodi
Copy link
Contributor Author

The sed command in the PR inserts this at the top of the theindex.html page:

image

@kaushalmodi kaushalmodi force-pushed the deploy-nightly-docs branch 2 times, most recently from 552cd8e to ad1013a Compare September 17, 2018 18:03
@kaushalmodi
Copy link
Contributor Author

Don't merge this yet. I realized that I can use the TRAVIS_COMMIT env var instead of calculating NIMVER as I do in the PR.

I'll update this PR tomorrow and request a merge again.

@kaushalmodi kaushalmodi changed the title Deploy devel build of docs to https://nim-lang.github.io/Nim WIP: Deploy devel build of docs to https://nim-lang.github.io/Nim Sep 18, 2018
@Araq
Copy link
Member

Araq commented Sep 18, 2018

Ok, also the entry point is generated from overview.rst and instead of your sed command we can patch nimdoc.cfg to add your note.

@kaushalmodi
Copy link
Contributor Author

Ok, also the entry point is generated from overview.rst

I didn't follow, so why isn't an index.html being created using that? Not at my computer right now, but if the overview.rst is generating overview.html, should I copy that to index.html instead?

instead of your sed command we can patch nimdoc.cfg to add your note.

I'll have to look at that file to see how to do that.. the 2 dynamic components in that note are the commit hash and the date of publishing. We need to derive those in the nimdoc.cfg then.

@Araq
Copy link
Member

Araq commented Sep 18, 2018

Not at my computer right now, but if the overview.rst is generating overview.html, should I copy that to index.html instead?

Yes, I think so.

I'll have to look at that file to see how to do that.. the 2 dynamic components in that note are the commit hash and the date of publishing. We need to derive those in the nimdoc.cfg then.

Not necessarily but you can leave this problem to me.

@kaushalmodi kaushalmodi changed the title WIP: Deploy devel build of docs to https://nim-lang.github.io/Nim Deploy devel build of docs to https://nim-lang.github.io/Nim Sep 18, 2018
@kaushalmodi
Copy link
Contributor Author

@Araq OK, I now copy the overview.html as index.html. I have already removed the sed command. As discussed, it would be nice if you can note the git commit used to generate the documentation somewhere on the page. I see that the footer already has the published time.. may be add the commit hash to it too?

This PR is now ready for merging.

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