Skip to content

Commit 980878b

Browse files
committed
Build docs using org-wide workflow, change audit
1 parent 4baf6b3 commit 980878b

File tree

2 files changed

+20
-44
lines changed

2 files changed

+20
-44
lines changed

.github/workflows/build.yaml

+19-38
Original file line numberDiff line numberDiff line change
@@ -285,45 +285,26 @@ jobs:
285285
- name: Install toolchain
286286
uses: dtolnay/rust-toolchain@nightly
287287

288-
- name: Document public API
289-
run: cargo doc -p time --all-features
288+
- name: Generate documentation
289+
run: cargo doc --workspace --all-features --no-deps
290290
env:
291-
RUSTDOCFLAGS: --cfg __time_03_docs -Zunstable-options --generate-link-to-definition
292-
293-
- name: Create top-level redirect
294-
run: |
295-
echo "<meta http-equiv='refresh' content='0; url=https://time-rs.github.io/api/time'>" \
296-
> ./target/doc/index.html
297-
298-
- name: Publish public docs
299-
uses: JamesIves/github-pages-deploy-action@releases/v4
300-
with:
301-
token: ${{ secrets.ACCESS_TOKEN }}
302-
branch: main
303-
folder: target/doc
304-
target-folder: api
305-
repository-name: time-rs/time-rs.github.io
306-
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
307-
308-
- name: Document internal API
309-
run: cargo doc -p time --all-features --document-private-items
310-
env:
311-
RUSTDOCFLAGS: --cfg __time_03_docs --document-hidden-items -Zunstable-options --generate-link-to-definition
312-
313-
- name: Create top-level redirect
314-
run: |
315-
echo "<meta http-equiv='refresh' content='0; url=https://time-rs.github.io/internal-api/time'>" \
316-
> ./target/doc/index.html
317-
318-
- name: Publish internal docs
319-
uses: JamesIves/github-pages-deploy-action@releases/v4
320-
with:
321-
token: ${{ secrets.ACCESS_TOKEN }}
322-
branch: main
323-
folder: target/doc
324-
target-folder: internal-api
325-
repository-name: time-rs/time-rs.github.io
326-
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
291+
RUSTDOCFLAGS: --cfg __time_03_docs
292+
293+
publish-documentation:
294+
name: Publish docs
295+
needs:
296+
- documentation
297+
- check-targets
298+
- check-benchmarks
299+
- test
300+
- cross-build
301+
- fmt
302+
- clippy
303+
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
304+
uses: time-rs/time-rs.github.io/.github/workflows/trigger-deploy.yaml@main
305+
secrets: inherit
306+
permissions:
307+
actions: write
327308

328309
coverage:
329310
name: Coverage

.github/workflows/dependency-audit.yaml

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ jobs:
99
security-audit:
1010
name: Dependency audit
1111
runs-on: ubuntu-latest
12-
permissions:
13-
issues: write
14-
checks: write
1512
steps:
1613
- name: Checkout sources
1714
uses: actions/checkout@v4
1815

1916
- name: Audit dependencies
20-
uses: rustsec/audit-check@v1
21-
with:
22-
token: ${{ secrets.GITHUB_TOKEN }}
17+
uses: EmbarkStudios/cargo-deny-action@v1

0 commit comments

Comments
 (0)