Skip to content

Commit

Permalink
cvss doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Aug 8, 2023
1 parent 45d585e commit e910dbc
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: rustdoc
on:
push:
branches:
- main

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -W unreachable-pub"
RUSTUP_MAX_RETRIES: 10

jobs:
rustdoc:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Rust toolchain
run: rustup update --no-self-update stable

- name: Build Documentation
run: cargo doc --no-deps --offline --workspace

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@364c31d33bb99327c77b3a5438a83a357a6729ad # v3.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true
2 changes: 1 addition & 1 deletion cpe/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/nvd-rs/0.0.1")]
#![doc(html_root_url = "https://emo-car.github.io/nvd-rs/cpe")]
// Package wfn provides a representation, bindings and matching of the Well-Formed CPE names as per
// https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7695.pdf and
// https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7696.pdf
Expand Down
2 changes: 1 addition & 1 deletion cve/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/nvd-rs/0.0.1")]
#![doc(html_root_url = "https://emo-car.github.io/nvd-rs/cve")]
pub mod cve;
pub mod error;
pub mod node;
Expand Down
4 changes: 2 additions & 2 deletions cvss/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#![doc(html_root_url = "https://docs.rs/nvd-rs/0.0.1")]
#![doc(html_root_url = "https://emo-car.github.io/nvd-rs/cvss")]
// 通用漏洞评分系统
// https://csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v3.x_beta.json
// https://www.first.org/cvss/specification-document
pub mod error;
mod metric;
pub mod v2;
pub mod v3;
mod version;
pub mod version;
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(
html_logo_url = "https://avatars.githubusercontent.com/u/30642514?s=360&v=4",
html_root_url = "https://docs.rs/nvd-rs/0.0.1"
html_root_url = "https://emo-car.github.io/nvd-rs"
)]
1 change: 0 additions & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#[cfg(test)]
mod tests {
use std::str::FromStr;

#[test]
fn it_works() {
let result = 2 + 2;
Expand Down

0 comments on commit e910dbc

Please sign in to comment.