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

PR preview docs #105

Merged
merged 9 commits into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

[![Travis](https://travis-ci.org/JuliaDiff/ChainRules.jl.svg?branch=master)](https://travis-ci.org/JuliaDiff/ChainRules.jl)
[![Coveralls](https://coveralls.io/repos/github/JuliaDiff/ChainRules.jl/badge.svg?branch=master)](https://coveralls.io/github/JuliaDiff/ChainRules.jl?branch=master)
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaDiff.github.io/ChainRules.jl/latest)

**Docs:*
[![](https://img.shields.io/badge/docs-master-blue.svg)](https://JuliaDiff.github.io/ChainRules.jl/dev)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaDiff.github.io/ChainRules.jl/stable)

The ChainRules package provides a variety of common utilities that can be used by downstream automatic differentiation (AD) tools to define and execute forward-, reverse-, and mixed-mode primitives.

Expand Down
22 changes: 21 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,24 @@ makedocs(
],
)

deploydocs(repo="github.com/JuliaDiff/ChainRules.jl.git")
const repo="github.com/JuliaDiff/ChainRules.jl.git"
const PR = get(ENV, "TRAVIS_PULL_REQUEST", "false")
if PR == "false"
# Normal case, only deply docs if merging to master or release tagged
deploydocs(repo=repo)
else
@info "Deploying review docs for PR #$PR"
# TODO: remove most of this once https://github.com/JuliaDocs/Documenter.jl/issues/1131 is resolved

# Overwrite Documenter's function for generating the versions.js file
foreach(Base.delete_method, methods(Documenter.Writers.HTMLWriter.generate_version_file))
nickrobinson251 marked this conversation as resolved.
Show resolved Hide resolved
Documenter.Writers.HTMLWriter.generate_version_file(_, _) = nothing
# Overwrite necessary environment variables to trick Documenter to deploy
ENV["TRAVIS_PULL_REQUEST"] = "false"
ENV["TRAVIS_BRANCH"] = "master"

deploydocs(
devurl="preview-PR$(PR)",
repo=repo,
)
end