Skip to content

Commit

Permalink
fix conditionals to allow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
blairhudson committed Jan 13, 2025
1 parent 9c6796e commit 7e56285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
version_bump_and_publish:
if: ${{ github.event_name == 'push' && (github.event.head_commit.modified.*[0] == 'fastapi_agents/' || github.event.head_commit.modified.*[0] == 'pyproject.toml' ) }}
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (contains(join(github.event.head_commit.modified, ' '), 'fastapi_agents/') || contains(join(github.event.head_commit.modified, ' '), 'pyproject.toml'))) }}
permissions:
contents: write
runs-on: ubuntu-latest
Expand Down Expand Up @@ -109,12 +109,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

generate_and_publish_docs:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (contains(join(github.event.head_commit.modified, ' '), 'README.md') || contains(join(github.event.head_commit.modified, ' '), 'docs/'))) || github.job == 'version_bump_and_publish' }}
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'README.md') || contains(github.event.head_commit.message, 'docs/') || github.job == 'version_bump_and_publish' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit 7e56285

Please sign in to comment.