Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stanvanrooy committed Mar 22, 2024
1 parent af0e267 commit 5f253b5
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Update docs
on:
workflow_dispatch:

jobs:
update-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'configurator'
- 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/configurator/src/configurator/ConfiguratorContext.ts configuratorContext.json ConfiguratorContext
tsdoc-parser $GITHUB_WORKSPACE/configurator/src/models/Configuration.ts configuration.json Configuration
file="$GITHUB_WORKSPACE/docs/docs/configurator/libraries/methods/configuratorContext.ts"
echo "export default $(cat configuratorContext.json)" > temp && mv temp $file
cd $GITHUB_WORKSPACE/docs
git checkout -b update-configurator-docs
git add .
git commit -m "Update documentation for @elfsquad/configurator"
git push --set-upstream origin update-configurator-docs -f
gh pr create --title "Update @elfsquad/configurator focumentation" \
--body "This PR updates the documentation for the @elfsquad/configurator package based on the latest changes."
env:
GH_TOKEN: ${{ secrets.TOKEN }}

0 comments on commit 5f253b5

Please sign in to comment.