File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494 working-directory : deploy-folder
9595 run : |
9696 git add .
97- git commit -m "Deploy #${{ github.run_number }} from ${{ github.ref }} branch - ${{ steps.set-env.outputs.build_env }}"
98- GIT_SSH_COMMAND="ssh -i ~/.ssh/deploy_key -o UserKnownHostsFile=~/.ssh/known_hosts" git push git@github.com:${{ github.repository }} gh-pages --force
97+ if git diff --cached --quiet; then
98+ echo "No changes to commit. Skipping deployment."
99+ else
100+ git commit -m "Deploy #${{ github.run_number }} from ${{ github.ref }} branch - ${{ steps.set-env.outputs.build_env }}"
101+ GIT_SSH_COMMAND="ssh -i ~/.ssh/deploy_key -o UserKnownHostsFile=~/.ssh/known_hosts" git push git@github.com:${{ github.repository }} gh-pages --force
102+ fi
99103
100104 - name : Clean Up Worktree
101105 run : git worktree remove deploy-folder --force
You can’t perform that action at this time.
0 commit comments