-
-
Notifications
You must be signed in to change notification settings - Fork 144
56 lines (45 loc) · 1.48 KB
/
documentation.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Documentation
on:
push:
branches: [ "master" ]
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
documentation:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout the Latest Code
uses: actions/checkout@v4
- name: Setup NodeJS - ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Python setuptools
# This is needed for Python 3.12+, since many versions of node-gyp
# are incompatible with Python 3.12+, which no-longer ships 'distutils'
# out of the box. 'setuptools' package provides 'distutils'.
run: python3 -m pip install setuptools
- name: Install Dependencies
run: yarn install
- name: Generate Public JSDocs
run: yarn run js-docs
- name: Generate Private JSDocs
run: yarn run private-js-docs
- name: Commit All Changes
run: |
if [ -n "`git status -s | grep "^ M"`" ]; then
echo "Uncommitted changes to repo files detected. Committing and pushing now."
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add -u
git commit -m "GH Action Documentation"
git push origin HEAD
else
echo "No changes detected in repo files. Nothing to commit!"
fi