From ce54649014025e44fe7f8ebe4f65ae33a693d6d2 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Sat, 6 Jan 2024 21:46:46 -0500 Subject: [PATCH 1/3] Add favicons/icons to rustdoc --- citro3d-sys/src/lib.rs | 7 +++++++ citro3d/src/lib.rs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/citro3d-sys/src/lib.rs b/citro3d-sys/src/lib.rs index c2867a5..c2a8fb8 100644 --- a/citro3d-sys/src/lib.rs +++ b/citro3d-sys/src/lib.rs @@ -4,6 +4,13 @@ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(clippy::all)] +#![doc(html_root_url = "https://rust3ds.github.io/citro3d-rs/crates")] +#![doc( + html_favicon_url = "https://user-images.githubusercontent.com/11131775/225929072-2fa1741c-93ae-4b47-9bdf-af70f3d59910.png" +)] +#![doc( + html_logo_url = "https://user-images.githubusercontent.com/11131775/225929072-2fa1741c-93ae-4b47-9bdf-af70f3d59910.png" +)] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/citro3d/src/lib.rs b/citro3d/src/lib.rs index c18e6fc..544ed89 100644 --- a/citro3d/src/lib.rs +++ b/citro3d/src/lib.rs @@ -2,6 +2,13 @@ #![test_runner(test_runner::run_gdb)] #![feature(doc_cfg)] #![feature(doc_auto_cfg)] +#![doc(html_root_url = "https://rust3ds.github.io/citro3d-rs/crates")] +#![doc( + html_favicon_url = "https://user-images.githubusercontent.com/11131775/225929072-2fa1741c-93ae-4b47-9bdf-af70f3d59910.png" +)] +#![doc( + html_logo_url = "https://user-images.githubusercontent.com/11131775/225929072-2fa1741c-93ae-4b47-9bdf-af70f3d59910.png" +)] //! Safe Rust bindings to `citro3d`. This crate wraps `citro3d-sys` to provide //! safer APIs for graphics programs targeting the 3DS. From 6ef7d17be337b43d7f447523eb89bcb8f574bf05 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Sat, 6 Jan 2024 21:56:12 -0500 Subject: [PATCH 2/3] Pin docs to known good nightly Also run on pull requests just for double checking --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c908bd5..b131dc0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,6 +4,7 @@ on: push: branches: - main + pull_request: workflow_dispatch: jobs: @@ -22,7 +23,7 @@ jobs: - uses: rust3ds/test-runner/setup@v1 with: - toolchain: nightly + toolchain: nightly-2023-06-01 - name: Build workspace docs run: cargo 3ds --verbose doc --verbose --no-deps --workspace From 63349bbb135f2d3fbd30478c280e0c6b24c62bc9 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Sat, 6 Jan 2024 22:04:40 -0500 Subject: [PATCH 3/3] Don't try to publish on PR --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b131dc0..165517a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -48,6 +48,7 @@ jobs: deploy: runs-on: ubuntu-latest needs: build + if: github.ref_name == 'main' permissions: pages: write id-token: write