From d3f48f4b79e86f3f29d2ee7a6c0b1f3ba3ef947b Mon Sep 17 00:00:00 2001 From: BananaHampster Date: Mon, 15 Jan 2024 21:40:21 -0800 Subject: [PATCH] =?UTF-8?q?use=20the=20right=20branch=20=F0=9F=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/beta.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 40db77c..163f4d4 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -23,14 +23,17 @@ jobs: steps: - name: deploy script uses: appleboy/ssh-action@master + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} with: host: ${{ secrets.BETA_SERVER_NAME }} username: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.BETA_DEPLOY_KEY }} script: | cd ~/hampalyzer - git reset --hard origin/master - git pull origin master + git reset --hard HEAD + git pull + git checkout $BRANCH_NAME npm install tsc cp -rfL ~/hampalyzer/frontend/* -t /var/www/beta.hampalyzer.com/html