meta: add pages publish action on master commits (#278)

## Motivation

Currently, we link to RustDoc on docs.rs. This is built when a crate is
published to crates.io. In some cases, it is also valuable to publish
the documentation for the latest `master` branch, so that users using
git dependencies can see up to date docs.

## Solution

This branch adds a GitHub action that will build docs & publish them to
the `gh-pages` branch when source files change.

Closes: #210

* add pages publish action on master commits
* only rebuild when sources change

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
Eliza Weisman
2019-08-14 13:51:20 -07:00
committed by GitHub
parent ad558aad6c
commit 02d45ec951

25
.github/workflows/publish_pages.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Publish Pages
on:
push:
branches:
- master
# only rebuild RustDoc when source code has changed, or the workflow is modified
paths:
- /**/src/**
- .github/workflows
jobs:
publish_doc:
runs-on: ubuntu-latest
steps:
# check out the repo
- uses: actions/checkout@v1
# This step references the directory that contains the action.
- name: build docs
run: cargo doc --all
- name: publish
uses: maxheld83/ghpages@v0.2.1
env:
BUILD_DIR=target/doc