Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .github/workflows/auto-docgen.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/bumpVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ jobs:
- name: Install (lockfile refresh if needed)
run: npm install --package-lock-only

- name: Generate documentation
run: npm run docgen

- name: Commit changes
run: |
BRANCH="${{ steps.bump.outputs.new_version }}"
git checkout -b "$BRANCH"
git status
git add package.json package-lock.json
git add package.json package-lock.json static/typedoc/typedoc.json
git commit -m "chore: bump version to v${{ steps.bump.outputs.new_version }}"

- name: Push branch
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0

# Use NodeJS v14.19.0
- uses: actions/setup-node@v2
Expand All @@ -31,6 +33,32 @@ jobs:
- name: Run npm install
run: npm install --legacy-peer-deps

# Check if generated documentation is up to date when version changes
- name: Verify generated documentation is committed
run: |
# Ensure we have the latest main branch reference locally to compare against
git fetch origin main:main

# Check if package.json version changed compared to main branch
if git diff main package.json | grep -q '"version"'; then
echo "Package version was updated"

# Regenerate documentation to verify it's current
npm run docgen

# Check if there are any changes to typedoc.json after regeneration
if ! git diff --exit-code static/typedoc/typedoc.json > /dev/null; then
echo "::error::Generated documentation is out of date!"
echo "::error::The committed static/typedoc/typedoc.json does not match the generated output."
echo "::error::Please run 'npm run docgen' locally and commit the updated static/typedoc/typedoc.json file"
exit 1
else
echo "✓ Documentation is up to date after regeneration"
fi
else
echo "Package version was not updated. Skipping doc check."
fi

# Verify lockfile is up to date
- name: Verify package-lock.json is up to date
run: |
Expand Down
Loading