fix: Order of git fetch and checkout

This commit is contained in:
Bart van der Braak 2023-06-12 02:39:32 +02:00
parent 2c3d3d0e6f
commit a50a7789d4

View file

@ -16,10 +16,10 @@ jobs:
- name: Delete directory in gh-pages
if: github.event.ref_type == 'branch'
run: |
git fetch --all
git checkout gh-pages
branchName=$(echo "${{ github.event.ref }}" | sed -e 's,^refs/heads/,,')
if [ -d "./.unlighthouse/${branchName}" ]; then
git fetch --all
git checkout gh-pages
git rm -rf --ignore-unmatch "${branchName}"
git commit -m "Cleanup directory for deleted branch ${branchName}"
git push origin gh-pages