Merge pull request #2485 from oasisprotocol/anzoman/rofl-scheduler-of… #1169
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: This name appears in GitHub's Checks API and in workflow's status badge. | |
| name: ci-docs | |
| # Trigger the workflow when: | |
| on: | |
| # A push occurs to one of the matched branches. | |
| push: | |
| branches: | |
| - main | |
| # Cancel in-progress jobs on same branch. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| rust-docs: | |
| # NOTE: This name appears in GitHub's Checks API. | |
| name: rust-docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| run: rustup show | |
| - name: Build docs | |
| run: | | |
| cargo doc \ | |
| --no-deps \ | |
| --package oasis-core-runtime \ | |
| --package oasis-runtime-sdk | |
| cargo doc \ | |
| --no-deps \ | |
| --all-features \ | |
| --package oasis-runtime-sdk-macros \ | |
| --package oasis-runtime-sdk-contracts \ | |
| --package oasis-contract-sdk \ | |
| --package oasis-contract-sdk-types \ | |
| --package oasis-contract-sdk-storage \ | |
| --package rofl-utils \ | |
| --package oasis-rofl-client | |
| - name: Deploy rust to api-reference branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| 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 | |
| py-docs: | |
| name: py-docs | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./rofl-client/py | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install sphinx myst-parser | |
| - name: Build docs | |
| run: | | |
| make docs | |
| - name: Deploy py to api-reference branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: rofl-client/py/docs/build/html | |
| publish_branch: api-reference | |
| destination_dir: py/rofl-client | |
| commit_message: Deploy py 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@v4 | |
| with: | |
| node-version: "18.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: Install ROFL client dependencies | |
| working-directory: rofl-client/ts | |
| run: npm ci | |
| - name: Build and generate ROFL client docs | |
| working-directory: rofl-client/ts | |
| run: | | |
| npm run build | |
| npx typedoc | |
| - name: Merge docs | |
| working-directory: client-sdk/ts-web | |
| run: | | |
| mkdir docs | |
| mv core/docs/api docs/client | |
| mv rt/docs/api docs/client-rt | |
| mv ext-utils/docs/api docs/client-ext-utils | |
| mv signer-ledger/docs/api docs/client-signer-ledger | |
| mv ../../rofl-client/ts/docs/api docs/rofl-client | |
| - name: Deploy js to api-reference branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: client-sdk/ts-web/docs | |
| publish_branch: api-reference | |
| destination_dir: js | |
| commit_message: Deploy js API reference ${{ github.event.head_commit.message }} | |
| user_name: github-actions[bot] | |
| user_email: 41898282+github-actions[bot]@users.noreply.github.com |