Skip to content

Check for version tag instead of event type in docs workflow#32

Merged
theroyalwhee0 merged 1 commit intomainfrom
31-docs-workflow-should-check-for-version-tag-instead-of-event-type
Nov 4, 2025
Merged

Check for version tag instead of event type in docs workflow#32
theroyalwhee0 merged 1 commit intomainfrom
31-docs-workflow-should-check-for-version-tag-instead-of-event-type

Conversation

@theroyalwhee0
Copy link
Owner

Summary

Updates the docs workflow to check if the current commit has a v* tag instead of checking the GitHub event type. This provides more flexibility for documentation generation.

Changes

Tag Detection:

  • Replaced github.event_name check with git tag --points-at HEAD
  • Filters for tags starting with 'v'
  • Sets is_release=true if any v* tags found on current commit

Fetch Depth:

  • Added fetch-depth: 0 to checkout step to ensure all tags are available

Index Page:

  • Removed index.html generation from workflow
  • Index page managed directly in gh-pages branch (always redirects to latest/)

Benefits

  • Manual workflow runs on tagged commits can generate versioned docs
  • Rebuilding docs for a specific version by running workflow on that tag
  • More flexible documentation generation regardless of trigger method

Test Plan

  • Merge PR and verify docs workflow runs on push to main
  • Verify unreleased/ is updated (no tag on commit)
  • Tag a commit with v* and run workflow manually
  • Verify versioned directory created and latest/ updated

Resolves #31

Change docs workflow to check if the current commit has a v* tag
instead of checking the event type. This allows:

- Manual workflow runs on tagged commits to generate versioned docs
- More flexible documentation generation regardless of trigger method
- Rebuilding docs for a specific version by running workflow on that tag

**Changes:**
- Replace event type check with tag detection using git tag --points-at HEAD
- Add fetch-depth: 0 to checkout to ensure all tags are available
- Remove index.html generation (managed directly in gh-pages branch)

Resolves #31
@theroyalwhee0 theroyalwhee0 linked an issue Nov 4, 2025 that may be closed by this pull request
@theroyalwhee0 theroyalwhee0 self-assigned this Nov 4, 2025
@theroyalwhee0 theroyalwhee0 added the 🔧 tooling Build tools, CI/CD, dev workflow label Nov 4, 2025
@theroyalwhee0 theroyalwhee0 merged commit cf76c30 into main Nov 4, 2025
1 check passed
@theroyalwhee0 theroyalwhee0 deleted the 31-docs-workflow-should-check-for-version-tag-instead-of-event-type branch November 4, 2025 00:34
theroyalwhee0 added a commit that referenced this pull request Nov 4, 2025
Add '|| true' to grep command to prevent exit code 1 from causing
workflow failure when no version tags are found on the commit.

This fixes the docs workflow failure introduced in #32.
theroyalwhee0 added a commit that referenced this pull request Nov 4, 2025
Add '|| true' to grep command to prevent exit code 1 from causing
workflow failure when no version tags are found on the commit.

This fixes the docs workflow failure introduced in #32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 tooling Build tools, CI/CD, dev workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs workflow should check for version tag instead of event type

1 participant