Skip to content

Commit 42e6a46

Browse files
committed
ci(deploy): add workflow_dispatch for manual triggers
1 parent 87286d0 commit 42e6a46

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
name: Deploy on tag
1+
name: Deploy
22

33
on:
44
push:
55
tags:
66
- 'v*.*.*'
7+
workflow_dispatch:
8+
inputs:
9+
ref:
10+
description: 'Git ref to deploy (tag, branch, or SHA). Defaults to origin/main.'
11+
required: false
12+
default: 'origin/main'
713

814
concurrency:
915
group: deploy-prod
@@ -25,4 +31,5 @@ jobs:
2531
script: |
2632
set -euo pipefail
2733
cd /opt/openstudy
28-
OPENSTUDY_DEPLOY_REF="${{ github.ref_name }}" ./deploy.sh --pull
34+
REF="${{ github.event.inputs.ref || github.ref_name }}"
35+
OPENSTUDY_DEPLOY_REF="$REF" ./deploy.sh --pull

0 commit comments

Comments
 (0)