Update docs #3
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 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 'actions@github.com' | |
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 }} | |