Skip to content

Update docs

Update docs #26

Workflow file for this run

name: Update docs
on:
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'authentication'
- uses: actions/setup-node@v4
with:
node-version: '24.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/authentication/src/authentication/authenticationContext.ts authenticationContext.json AuthenticationContext
file="$GITHUB_WORKSPACE/docs/docs/configurator/libraries/methods/authenticationContext.ts"
echo "export default $(cat authenticationContext.json)" > temp && mv temp $file
cd $GITHUB_WORKSPACE/docs
git checkout -b update-authentication-context-docs
git add .
git commit -m "Update documentation for authentication context"
git push --set-upstream origin update-authentication-context-docs -f
gh pr create --title "Update Authentication Context Documentation" \
--body "This PR updates the documentation for the Authentication Context based on the latest changes."
env:
GH_TOKEN: ${{ secrets.TOKEN }}