Skip to content

Update docs

Update docs #3

Workflow file for this run

name: Update docs
on:
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'showroom-iframe'
- uses: actions/setup-node@v2
with:
node-version: '20.x'
- name: Clone docs
run: |
cd $GITHUB_WORKSPACE/
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git clone https://x-access-token:${{ secrets.TOKEN }}@github.com/elfsquad/docs.git
- name: Update docs
run: |
npm i -g @elfsquad/tsdoc-parser
tsdoc-parser $GITHUB_WORKSPACE/showroom-iframe/src/index.ts showroomIframe.json ElfsquadShowroom
file="$GITHUB_WORKSPACE/docs/docs/configurator/libraries/methods/showroomIframe.ts"
echo "export default $(cat showroomIframe.json)" > temp && mv temp $file
cd $GITHUB_WORKSPACE/docs
git checkout -b update-showroom-iframe-docs
git add .
git commit -m "Update documentation for @elfsquad/showroom-iframe"
git push --set-upstream origin update-showroom-iframe-docs -f
gh pr create --title "Update @elfsquad/showroom-iframe documentation" \
--body "This PR updates the documentation for the @elfsquad/showroom-iframe package based on the latest changes."
env:
GH_TOKEN: ${{ secrets.TOKEN }}