Skip to content

Commit

Permalink
Publish rustdoc to gh-pages branch (#337)
Browse files Browse the repository at this point in the history
Signed-off-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
  • Loading branch information
heeckhau authored Sep 20, 2023
1 parent a6d5fcb commit 407fcb9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rust

on:
push:
branches: [dev]
pull_request:
branches: [dev]

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: Install Rust Toolchain (Stable)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: "rustdoc"
run: cd tlsn; cargo doc -p tlsn-core -p tlsn-prover -p tlsn-notary --no-deps --all-features
# --target-dir ${GITHUB_WORKSPACE}/docs

# https://dev.to/deciduously/prepare-your-rust-api-docs-for-github-pages-2n5i
- name: "Add index file -> tlsn_prover"
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=tlsn_prover\">" > tlsn/target/doc/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/dev' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: tlsn/target/doc/
# cname: rustdocs.tlsnotary.org
2 changes: 1 addition & 1 deletion tlsn/examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tlsn-notary.workspace = true
tlsn-core.workspace = true
tlsn-tls-core.workspace = true
tlsn-tls-client.workspace = true
notary-server = { version = "0.1.0", git = "https://github.com/tlsnotary/notary-server" }
notary-server = { version = "0.1.0-alpha.1", git = "https://github.com/tlsnotary/notary-server" }
mpz-core.workspace = true

futures.workspace = true
Expand Down

0 comments on commit 407fcb9

Please sign in to comment.