Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Add travis task to deploy docs #951

Merged
merged 4 commits into from
Jan 22, 2019
Merged

Add travis task to deploy docs #951

merged 4 commits into from
Jan 22, 2019

Conversation

huguestennier
Copy link
Contributor

@huguestennier huguestennier commented Jan 16, 2019

What are you trying to accomplish with this PR?

Fix #917.

Related PR : #950

Contributing to docs should be as easy as commiting .md files for the maintainers.

We can leverage Travis CI to run the build commands and deploy on the gh-pages branch for us whenever we merge documentation change onto master.


The file is pretty straightforward, but some notes :

There's three condition to run the deploy ;

  1. If it's on the master branch
  2. Not a PR
  3. If there are files that were modified in the docs folder

Why was this approach chosen

Docusaurus has a built-in command docusaurus-publish specifically for our case. The problem is that since v0 isn't on Docusaurus, we have to work around and manually run the build command and copy the files over the gh-pages branch.

Future iterations

  1. It would be great if we could also check in the modified files were in v1 or v0 and only trigger the build necessary. Since the build process is fast (~2min for both) it doesn't really matter for now

  2. Instead of cloning the repo with a GitHub access token, we could leverage SSH connection but it's not an easy task over Travis.

@huguestennier huguestennier changed the base branch from master to update-docs-structure January 16, 2019 15:58
@huguestennier huguestennier self-assigned this Jan 16, 2019
Copy link
Contributor

@t-kelly t-kelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get an explanation of how to contribute to docs in the CONTRIBUTING.md

@huguestennier huguestennier changed the base branch from update-docs-structure to master January 22, 2019 18:28
@huguestennier huguestennier merged commit 95c6021 into master Jan 22, 2019
@huguestennier huguestennier deleted the travis-build-docs branch January 22, 2019 18:29
@lock
Copy link

lock bot commented Feb 21, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants