Skip to content

Commit c73d4c8

Browse files
committed
CI: generate docs and display "builds" badge in README
1 parent dda8257 commit c73d4c8

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docs
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
docs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Rust
17+
uses: actions-rs/toolchain@v1
18+
with:
19+
toolchain: stable
20+
profile: minimal
21+
override: true
22+
- name: Cache Cargo dependencies
23+
uses: Swatinem/rust-cache@v2
24+
- name: Generate docs
25+
run: cargo doc
26+
27+
28+
# TODO: deploy these somewhere?

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
<!-- badges: start -->
44
[![made-with-rust](https://img.shields.io/badge/Made%20with-Rust-1f425f.svg)](https://www.rust-lang.org/)
5-
[![Build](https://github.com/SynthesisLab/shepherd/actions/workflows/build.yaml/badge.svg?branch=main&event=push)](https://github.com/SynthesisLab/shepherd/actions/workflows/build.yaml)
6-
[![Tests](https://github.com/SynthesisLab/shepherd/actions/workflows/test.yaml/badge.svg?branch=main&event=push)](https://github.com/SynthesisLab/shepherd/actions/workflows/test.yaml)
5+
[![Build](https://github.com/SynthesisLab/shepherd/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/SynthesisLab/shepherd/actions/workflows/build.yml)
6+
[![Docs](https://github.com/SynthesisLab/shepherd/actions/workflows/docs.yml/badge.svg?branch=main&event=push)](https://github.com/SynthesisLab/shepherd/actions/workflows/docs.yml)
7+
[![Tests](https://github.com/SynthesisLab/shepherd/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/SynthesisLab/shepherd/actions/workflows/test.yml)
78
<!-- badges: end -->
89

910

0 commit comments

Comments
 (0)