From 2f045e13cc0b2b72709c84d4a64f4faf7ad356f7 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 14:35:30 -0700 Subject: [PATCH] create docs job, update ciricle ci rust version --- .circleci/config.yml | 26 ++++++++++----------- .github/workflows/docs.yml | 47 ++++++++++++++++++++++++++++++++++++++ leo/lib.rs | 2 ++ 3 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 5853674ed5..8a2499e9e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - checkout @@ -76,7 +76,7 @@ jobs: # code-cov: # docker: - # - image: cimg/rust:1.53.0 + # - image: cimg/rust:1.54.0 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -118,7 +118,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - checkout @@ -136,7 +136,7 @@ jobs: leo-new: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -149,7 +149,7 @@ jobs: leo-init: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -162,7 +162,7 @@ jobs: leo-clean: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -175,7 +175,7 @@ jobs: leo-setup: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -188,7 +188,7 @@ jobs: leo-add-remove: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -201,7 +201,7 @@ jobs: leo-check-constraints: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -214,7 +214,7 @@ jobs: leo-login-logout: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -227,7 +227,7 @@ jobs: leo-clone: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -240,7 +240,7 @@ jobs: leo-publish: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..e6ef015f8d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,47 @@ +name: Master Crates Docs +on: + push: + branches: + - master + +jobs: + build-crates-docs: + name: Build Crates Docs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Build Cargo Docs + run: | + cargo doc + mv -r ./target/doc/leo /tmp/ + + - name: Save Docs + uses: actions/upload-artifact@master + with: + name: leo-docs + path: /tmp/target/doc/leo + + deploy-crates-docs: + name: Deploy Crates Docs + runs-on: ubuntu-latest + steps: + - name: Load Docs + uses: actions/download-artifact@master + with: + name: leo-docs + path: /tmp/target/doc/leo + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc/leo \ No newline at end of file diff --git a/leo/lib.rs b/leo/lib.rs index 94ce90e005..6c0c3470b2 100644 --- a/leo/lib.rs +++ b/leo/lib.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +#![doc = include_str!("../README.md")] + pub mod api; pub mod commands; pub mod config;