Skip to content

Publish rustdoc to docs folder #1

Publish rustdoc to docs folder

Publish rustdoc to docs folder #1

Workflow file for this run

name: Rust
on:
push:
branches: [334-publish-rustdoc-on-github-pages]
pull_request:
branches: [334-publish-rustdoc-on-github-pages]
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
rustdoc:
if: ( ! github.event.pull_request.draft )
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/[email protected]
with:
workspaces: ${{ matrix.package }} -> target
- name: "rustdoc"
run: cd tlsn; cargo doc
# --target-dir ${GITHUB_WORKSPACE}/docs
# https://dev.to/deciduously/prepare-your-rust-api-docs-for-github-pages-2n5i
- name: "publish"
run: |
rm -rf ${GITHUB_WORKSPACE}/docs
echo "<meta http-equiv=\"refresh\" content=\"0; url=tlsn_core\">" > tlsn/target/doc/index.html
cp -r tlsn/target/doc ${GITHUB_WORKSPACE}/docs