From 57f2a8633d8f86f3fbb7f3e6d3deda7c6de279b5 Mon Sep 17 00:00:00 2001 From: Jorge Leitao Date: Sat, 20 Aug 2022 11:31:07 +0200 Subject: [PATCH] Improved github page generation (#1233) Improved docs --- .github/workflows/docs.yml | 32 ++++++++++++++++++++------------ README.md | 8 ++++---- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 99073a640a7..b3ed0895dac 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,7 +6,7 @@ jobs: guide: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 @@ -15,6 +15,20 @@ jobs: - run: mdbook build guide + - name: Deploy + if: github.ref == 'refs/heads/docs_test' || startsWith(github.ref, 'refs/tags/v') + uses: peaceiris/actions-gh-pages@v3.7.3 + with: + personal_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./guide/book + destination_dir: ./${{github.ref_name}}/guide + keep_files: false + + docs: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: @@ -23,24 +37,18 @@ jobs: override: true components: rustfmt, rust-src + - uses: Swatinem/rust-cache@v1 + - name: Build Documentation run: cargo doc --lib --features full --no-deps env: RUSTDOCFLAGS: --cfg docsrs - name: Deploy - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/docs_test' || startsWith(github.ref, 'refs/tags/v') uses: peaceiris/actions-gh-pages@v3.7.3 with: personal_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./guide/book + publish_dir: ./target/doc/arrow2 + destination_dir: ./${{github.ref_name}}/docs keep_files: false - - - name: Deploy - if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3.7.3 - with: - personal_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./target/doc - destination_dir: ./docs - keep_files: true diff --git a/README.md b/README.md index 8992d0f8ac9..51818066b45 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ A Rust crate to work with [Apache Arrow](https://arrow.apache.org/). The most feature-complete implementation of the Arrow format after the C++ implementation. -Check out [the guide](https://jorgecarleitao.github.io/arrow2/) for a general introduction -on how to use this crate, and -[API docs](https://jorgecarleitao.github.io/arrow2/docs/arrow2/index.html) for a detailed -documentation of each of its APIs. +Check out [the guide](https://jorgecarleitao.github.io/arrow2/main/guide) +for a general introduction on how to use this crate, and +[API docs](https://jorgecarleitao.github.io/arrow2/main/docs) +for a detailed documentation of each of its APIs. ## Features