Skip to content

Commit

Permalink
Build docs using org-wide workflow, change audit
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Feb 1, 2024
1 parent 4baf6b3 commit 980878b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 44 deletions.
57 changes: 19 additions & 38 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,45 +285,26 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Document public API
run: cargo doc -p time --all-features
- name: Generate documentation
run: cargo doc --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: --cfg __time_03_docs -Zunstable-options --generate-link-to-definition

- name: Create top-level redirect
run: |
echo "<meta http-equiv='refresh' content='0; url=https://time-rs.github.io/api/time'>" \
> ./target/doc/index.html
- name: Publish public docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: main
folder: target/doc
target-folder: api
repository-name: time-rs/time-rs.github.io
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)

- name: Document internal API
run: cargo doc -p time --all-features --document-private-items
env:
RUSTDOCFLAGS: --cfg __time_03_docs --document-hidden-items -Zunstable-options --generate-link-to-definition

- name: Create top-level redirect
run: |
echo "<meta http-equiv='refresh' content='0; url=https://time-rs.github.io/internal-api/time'>" \
> ./target/doc/index.html
- name: Publish internal docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: main
folder: target/doc
target-folder: internal-api
repository-name: time-rs/time-rs.github.io
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
RUSTDOCFLAGS: --cfg __time_03_docs

publish-documentation:
name: Publish docs
needs:
- documentation
- check-targets
- check-benchmarks
- test
- cross-build
- fmt
- clippy
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.master_branch)
uses: time-rs/time-rs.github.io/.github/workflows/trigger-deploy.yaml@main
secrets: inherit
permissions:
actions: write

coverage:
name: Coverage
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/dependency-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ jobs:
security-audit:
name: Dependency audit
runs-on: ubuntu-latest
permissions:
issues: write
checks: write
steps:
- name: Checkout sources
uses: actions/checkout@v4

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

0 comments on commit 980878b

Please sign in to comment.