From 55af388a6012e0561f622bab3fa38a226d8dc848 Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 22 Jul 2020 23:20:18 +0200 Subject: [PATCH 1/2] ci(workflow): add documentation workflow This commit adds a workflow that builds the crate's documentation on every master push and uploads those to the `gh-pages` branch. The workflow is taken from `SirWindfield/zerotask-rust-lib-template`. --- .github/workflows/docs.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..440f864d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,39 @@ +name: Continuous Integration - Docs + +on: + push: + branches: + - master + paths: + - "**.rs" + - "Cargo.toml" + - "Cargo.lock" + +jobs: + docs: + name: Generate crate documentation + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + + - name: Generate documentation + uses: actions-rs/cargo@v1 + env: + RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" + with: + command: doc + args: --workspace --no-deps + + - name: Deploy documentation + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc From fec351239d4cfd38d45eb59610726fba6b698b50 Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 22 Jul 2020 23:26:13 +0200 Subject: [PATCH 2/2] chore(readme): update documentation badges --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 34e4194a..5561fb83 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -env_logger [![Build Status](https://travis-ci.org/sebasmagri/env_logger.svg?branch=master)](https://travis-ci.org/sebasmagri/env_logger) [![Maintenance](https://img.shields.io/badge/maintenance-actively%20maintained-brightgreen.svg)](https://github.com/sebasmagri/env_logger) [![crates.io](https://img.shields.io/crates/v/env_logger.svg)](https://crates.io/crates/env_logger) [![Documentation](https://img.shields.io/badge/docs-current-blue.svg)](https://docs.rs/env_logger) +# env_logger +[![Build Status](https://travis-ci.org/sebasmagri/env_logger.svg?branch=master)](https://travis-ci.org/sebasmagri/env_logger) +[![Maintenance](https://img.shields.io/badge/maintenance-actively%20maintained-brightgreen.svg)](https://github.com/sebasmagri/env_logger) +[![crates.io](https://img.shields.io/crates/v/env_logger.svg)](https://crates.io/crates/env_logger) +[![Documentation](https://docs.rs/env_logger/badge.svg)](https://docs.rs/env_logger) +[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)](https://env-logger-rs.github.io/env_logger) ========== Implements a logger that can be configured via environment variables.