Skip to content
Merged
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
12 changes: 11 additions & 1 deletion .github/workflows/deep-sea-stories-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ name: Deploy deep-sea-stories
on:
push:
branches: ["main"]
workflow_dispatch:
inputs:
branch:
description: "Branch to deploy"
required: true
default: "main"
type: string

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch || github.ref }}
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}

Copilot uses AI. Check for mistakes.
- name: Deploy
uses: appleboy/ssh-action@v0.1.7
with:
Expand All @@ -17,7 +26,8 @@ jobs:
key: ${{ secrets.VM_SSH_KEY }}
script: |
cd ~/examples/deep-sea-stories
git switch main
git fetch --all
git switch ${{ inputs.branch || 'main' }}
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' }}

Copilot uses AI. Check for mistakes.
git pull

umask 077
Expand Down