Checkout to a branch, not to a commit

This commit is contained in:
Nikolai Rodionov 2023-04-26 07:17:19 +02:00
parent beefd5540f
commit 32b08eac39
No known key found for this signature in database
GPG Key ID: 19DB54039EBF8F10
2 changed files with 1 additions and 2 deletions

View File

@ -42,7 +42,7 @@ steps:
GIT_LFS_SKIP_SMUDGE: 1 GIT_LFS_SKIP_SMUDGE: 1
commands: commands:
- git clone $DRONE_REMOTE_URL --recurse-submodules . - git clone $DRONE_REMOTE_URL --recurse-submodules .
- git checkout $DRONE_COMMIT - git checkout $DRONE_BRANCH
- name: Test a build - name: Test a build
image: git.badhouseplants.net/badhouseplants/hugo-builder image: git.badhouseplants.net/badhouseplants/hugo-builder

View File

@ -20,7 +20,6 @@ print `git -C /tmp/$git_commit_sha lfs pull` or die;
print "Creating a new hashed dir in the common bucket\n"; print "Creating a new hashed dir in the common bucket\n";
print `rclone copy /tmp/$git_commit_sha/static "$common_bucket/$git_commit_sha"` or die; print `rclone copy /tmp/$git_commit_sha/static "$common_bucket/$git_commit_sha"` or die;
print $git_branch;
if ($git_branch eq $main_branch) { if ($git_branch eq $main_branch) {
print "Syncing to the production bucket\n"; print "Syncing to the production bucket\n";