Update API Reference #96
This file contains 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
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 |