We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7ebe73 commit d76868fCopy full SHA for d76868f
1 file changed
.github/workflows/deploy.yml
@@ -32,6 +32,11 @@ jobs:
32
set -euo pipefail
33
cd /opt/openstudy
34
REF="${{ github.event.inputs.ref || github.ref_name }}"
35
+ # Normalize bare branch names to origin/<branch> so the reset
36
+ # picks up the freshly-fetched commits, not the stale local branch.
37
+ if [[ "$REF" != origin/* && "$REF" != v* ]]; then
38
+ REF="origin/$REF"
39
+ fi
40
echo "Deploying ref: $REF"
41
git fetch --all --tags
42
git reset --hard "$REF"
0 commit comments