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

Travis-CI for mdbook and gh-pages #82

Merged
merged 2 commits into from
Apr 16, 2020

Conversation

milesfrain
Copy link
Member

@milesfrain milesfrain commented Apr 14, 2020

Here is an example of the Travis job running on my travis-demo branch.

Preview: https://milesfrain.github.io/purescript-book/

The only difference with this PR is the removal these lines to default to master branch:

  on:
    branch: travis-demo # Will default to master branch if on.branch is removed

The remaining configuration steps are:

@hdgarrood we could use your help with these administrative tasks.

@hdgarrood
Copy link

Can I request that we use dplv2 with a deploy key? That way if the key does get compromised somehow it will only be able to modify this repository, whereas if a personal access token is compromised then the attacker would be able to modify any repository the owner of the token has access to.

@milesfrain
Copy link
Member Author

Can I request that we use dplv2 with a deploy key?

Sounds good. Updated PR

@hdgarrood
Copy link

I guess we (I) will need to change the github pages configuration for this repo so that it uses the gh-pages branch for the site rather than the master branch, as it does currently. I'll do that once this PR is merged and the auto deployment has successfully built the book and pushed it to the gh-pages branch.

@milesfrain milesfrain merged commit 56951d7 into purescript-contrib:master Apr 16, 2020
@milesfrain milesfrain deleted the travis-pr branch April 16, 2020 01:53
@milesfrain
Copy link
Member Author

@hdgarrood Looks like there was an issue with the deploy key.
https://travis-ci.com/github/purescript-contrib/purescript-book/builds/160480788
I don't have access to the repository settings, so it's tough for me to troubleshoot.

@hdgarrood
Copy link

I've fixed it - apparently the deploy_key option needs to point to a file which contains the key, you can't just put the key in the environment variable directly. I followed Travis' guide to adding encrypted files and added deploy_key.enc to the repo. This now seems to be working, but the book.purescript.org link is no longer working because the CNAME file doesn't appear to have made it across into the gh-pages branch.

@milesfrain
Copy link
Member Author

the CNAME file doesn't appear to have made it across into the gh-pages branch

Did a quick commit (or two) to fix this.
Looks like it's working now.

@hdgarrood
Copy link

Oh, I've just spotted that the README is no longer present in the rendered HTML - can we configure mdbook to include it?

@milesfrain
Copy link
Member Author

Fixed with #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants