Skip to content

Commit

Permalink
ci: Add typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Sep 20, 2023
1 parent f7fcb8b commit 217c2ac
Showing 1 changed file with 65 additions and 9 deletions.
74 changes: 65 additions & 9 deletions .github/workflows/ci-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ concurrency:

jobs:

publish-docs:
rust-docs:
# NOTE: This name appears in GitHub's Checks API.
name: publish-docs
name: rust-docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -39,11 +39,67 @@ jobs:
--package oasis-contract-sdk-types \
--package oasis-contract-sdk-storage
- name: Publish docs
uses: crazy-max/ghaction-github-pages@v3
- name: Deploy rust to api-reference branch
uses: peaceiris/actions-gh-pages@v3
with:
target_branch: api-reference
build_dir: target/doc
commit_message: Deploy API reference
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/doc
publish_branch: api-reference
destination_dir: rust
commit_message: Deploy rust API reference ${{ github.event.head_commit.message }}
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

js-docs:
name: js-docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js LTS
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: npm
cache-dependency-path: 'client-sdk/ts-web/package-lock.json'

- name: Install dependencies and build
working-directory: client-sdk/ts-web
run: npm ci --foreground-scripts

- name: core
working-directory: client-sdk/ts-web/core
run: npx typedoc

- name: rt
working-directory: client-sdk/ts-web/rt
run: npx typedoc

- name: ext-utils
working-directory: client-sdk/ts-web/ext-utils
run: npx typedoc

- name: signer-ledger
working-directory: client-sdk/ts-web/signer-ledger
run: npx typedoc

- name: Merge docs
working-directory: client-sdk/ts-web
run: |
mkdir doc
mv core/doc doc/client
mv rt/doc doc/client-rt
mv ext-utils/doc doc/client-ext-utils
mv signer-ledger/doc doc/client-signer-ledger
- name: Deploy js to api-reference branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: client-sdk/ts-web/doc
publish_branch: api-reference
destination_dir: js
commit_message: Deploy rust API reference ${{ github.event.head_commit.message }}
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

0 comments on commit 217c2ac

Please sign in to comment.