aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2023-11-22 22:22:43 +0300
committerhozan23 <hozan23@proton.me>2023-11-22 23:07:14 +0300
commit8981f3d12bb8dd699254371da356d5a441f0a630 (patch)
tree605b3e445c7d99b05dacfa1c9f690d49922e46f7 /.github/workflows
parentd4c8251ea3c4f6e809bb19f8faa907083316f483 (diff)
add docs.yml github workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/docs.yml52
-rw-r--r--.github/workflows/rust.yml2
2 files changed, 53 insertions, 1 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..6711231
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,52 @@
+name: Build and Deploy Rust API Docs
+
+on:
+ push:
+ branches:
+ - test-ci-docs
+
+jobs:
+ docs:
+ name: build karyons rust api docs
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
+ - name: Get date for registry cache
+ id: date
+ run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
+
+ - name: Cargo registry cache
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.cargo/registry/index
+ ~/.cargo/registry/cache
+ ~/.cargo/git
+ key: ${{ runner.os }}-cargo-registry-${{ steps.date.outputs.date }}
+
+ - name: Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+
+ - name: Build Documentation
+ uses: actions-rs/cargo@v1
+ with:
+ command: doc
+ args: --no-deps --all --document-private-items
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./target/doc
+ publish_branch: gh-pages
+ force_orphan: true
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 46a914a..41c5870 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -9,7 +9,7 @@ env:
jobs:
build_and_test:
- name: Rust project - latest
+ name: karyons - latest
runs-on: ubuntu-latest
strategy:
matrix: