diff --git a/.github/workflows/on commit.yaml b/.github/workflows/on commit.yaml index 7da5dab4..dffeb14d 100644 --- a/.github/workflows/on commit.yaml +++ b/.github/workflows/on commit.yaml @@ -28,16 +28,17 @@ jobs: git config --global user.email "sunserega2@gmail.com" git config --global --add url.https://github.com/.insteadOf "git@github.com:" - git checkout --orphan "gh-pages/$(git rev-parse --abbrev-ref HEAD)" + branch_name="gh-pages/$(git rev-parse --abbrev-ref HEAD)" + git checkout --orphan "$branch_name" mv ".git" "Packing/Reference/0Release/" cd "Packing/Reference/0Release/" git add . git commit -m "Split off gh-pages" - diff=$(git diff origin/$current_branch) + diff=$(git diff "origin/$branch_name") if [ -n "$diff" ]; then echo "Differences found. Force pushing the current branch to the remote." - git push -f --set-upstream origin "$(git rev-parse --abbrev-ref HEAD)" + git push -f --set-upstream origin "$branch_name" else echo "No differences found" fi