Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for manual workflow dispatch to the deep-sea-stories deployment workflow, enabling deployments from branches other than main.
Changes:
- Added
workflow_dispatchtrigger with a branch input parameter - Updated checkout and deployment steps to use the specified branch instead of hardcoded "main"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ inputs.branch || github.ref }} |
There was a problem hiding this comment.
When triggered by a push event, inputs.branch will be undefined (not null), causing the expression to evaluate to the empty string rather than falling back to github.ref. Use github.event.inputs.branch for the fallback check or replace with: ref: ${{ github.event.inputs.branch || github.ref }}
| cd ~/examples/deep-sea-stories | ||
| git switch main | ||
| git fetch --all | ||
| git switch ${{ inputs.branch || 'main' }} |
There was a problem hiding this comment.
Similar to the checkout step, inputs.branch will be undefined during push events. The expression should use github.event.inputs.branch to properly fall back to 'main' when triggered by push: git switch ${{ github.event.inputs.branch || 'main' }}
No description provided.