diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 26c2564..cb0ab29 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,26 +29,25 @@ jobs: git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" - git checkout -b production - find . -type f ! -path './site*' ! -path './.*' -exec echo {} + - find . -type f ! -path './site*' ! -path './.*' -exec rm -f {} + - rm -rf docs - mv site docs - touch .nojekyll - git add . - git commit -m "Content update" + # git checkout -b production + # find . -type f ! -path './site*' ! -path './.*' -exec echo {} + + # find . -type f ! -path './site*' ! -path './.*' -exec rm -f {} + + # rm -rf docs + # mv site docs + # touch .nojekyll + # git add . + # git commit -m "Content update" # Fetch and pull changes from the remote "production" branch: git fetch origin production git branch --set-upstream-to=origin/production production git pull --rebase - # Backup the current state of the production branch - git branch backup-production - git checkout backup-production - git push origin backup-production - + # Update the production branch with force push git checkout production - git rebase origin/production - git push -f origin production + git rm */* + + git checkout main -- site + git mv site docs + git push origin production