-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.49 KB
/
Copy pathupdate-docs.yml
File metadata and controls
38 lines (35 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}