From 0ed98dc06aedc0f2332c80f2f1fc59d32e903abf Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sat, 4 Jun 2022 17:11:16 +0100 Subject: [PATCH] Support tags as well as branches when deploying --- .github/workflows/deploy.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e383a61c..4b65cf07 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,12 +21,6 @@ jobs: - name: 🌎 Set Environment Variables Part 2 run: | echo "newReleaseDir=${{ env.releasesDir }}/${{ env.newReleaseName }}" >> $GITHUB_ENV - - name: 🔀 Get Branch - id: branch - run: | - echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - - name: 🔍 Check Branch - run: echo "${{ env.branch }}" - name: 🔄 Clone Repository uses: appleboy/ssh-action@master with: @@ -45,7 +39,7 @@ jobs: mkdir ${{ env.newReleaseDir }} # Clone app - git clone --depth 1 --branch ${{ env.branch }} https://github.com/${{ env.repository }} ${{ env.newReleaseName }} + git clone --depth 1 --branch ${{ github.ref_name }} https://github.com/${{ env.repository }} ${{ env.newReleaseName }} # Mark release cd ${{ env.newReleaseDir }}