Skip to content

Update API Reference #96

Update API Reference

Update API Reference #96

Workflow file for this run

name: Update API Reference
on:
workflow_dispatch:
jobs:
generate_api_reference:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install packages
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Generate Store API Reference
working-directory: ./packages/hms-video-store
run: yarn docs
- name: Generate React SDK API Reference
working-directory: ./packages/react-sdk
run: yarn docs
- name: checkout 100ms-docs
uses: actions/checkout@v2
with:
token: ${{ secrets.DOCKER_GIT_TOKEN }}
repository: 100mslive/100ms-docs
path: 100ms-docs
- name: copy over api reference
run: |
mkdir -p ./100ms-docs/docs/api-reference/javascript/react
cp -R ./packages/hms-video-store/docs ./100ms-docs/docs/api-reference/javascript
cp -R ./packages/react-sdk/docs ./100ms-docs/docs/api-reference/javascript/react
- name: replace old api-reference
working-directory: ./100ms-docs/docs/api-reference/javascript
run: |
rm -r v2
mv docs v2
mv react/docs v2/react-hooks
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
path: 100ms-docs
token: ${{ secrets.DOCKER_GIT_TOKEN }}
commit-message: 'docs(web): update api reference'
title: 'docs(web): update api reference'
labels: automated pr
branch: web-api-reference
base: main
delete-branch: true