Skip to content

Commit 7cd52a7

Browse files
authored
Check Docs Generation on PRs, fix docs generation (#223)
* feat(ci): Build docs for PRs Build docs when making PRs to avoid broken docs after merging. A filter is added so that the docs are only pushed to GitHub pages when on the main branch * fix(runtime) pull in div-floor fix
1 parent e80f074 commit 7cd52a7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/docs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
on:
22
push:
33
branches: [main]
4+
pull_request:
45

56
env:
67
rust_version: 1.51.0
@@ -21,7 +22,8 @@ jobs:
2122
env:
2223
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
2324
working-directory: sdk
24-
- name: Push the docs
25+
- name: Push the docs
26+
if: ${{ github.ref == 'refs/heads/main' }}
2527
run: |
2628
ls
2729
git checkout -B gh-pages

sdk/smithy-types/src/instant/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ impl Instant {
147147
/// This is fallible since `Instant` holds more precision than an `i64`, and will
148148
/// return a `ConversionError` for `Instant` values that can't be converted.
149149
pub fn to_epoch_millis(&self) -> Result<i64, ConversionError> {
150-
let subsec_millis = i64::from(self.subsecond_nanos).div_floor(&(NANOS_PER_MILLI as i64));
150+
let subsec_millis =
151+
Integer::div_floor(&i64::from(self.subsecond_nanos), &(NANOS_PER_MILLI as i64));
151152
if self.seconds < 0 {
152153
self.seconds
153154
.checked_add(1)

0 commit comments

Comments
 (0)