Merge pull request #1122 from pulsar-edit/fix-better-sqlite-library #359
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: 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 |