diff --git a/.gitea/workflows/doxygen.yaml b/.gitea/workflows/doxygen.yaml index 20db141..eff072d 100644 --- a/.gitea/workflows/doxygen.yaml +++ b/.gitea/workflows/doxygen.yaml @@ -22,27 +22,22 @@ jobs: run: | doxygen Doxyfile - - name: Move `/docs/html/` contents to a new branch + - name: Move `/docs/html/` contents to web branch run: | # Ensure a clean Git state git config --global user.name "${{ gitea.actor }}" git config --global user.email "${{ gitea.actor }}@example.com" git fetch origin + + # Create the web branch git checkout --orphan web git reset --hard git clean -fdx - # Ensure docs/html exists and copy files - if [ -d "docs/html" ]; then - mkdir -p temp_html - cp -r docs/html/* temp_html/ || exit 1 - mv temp_html/* . - rmdir temp_html - else - echo "Directory docs/html/ does not exist. Exiting." - exit 1 - fi + # Copy the contents of docs/html/ to the root + cp -r docs/html/* . || exit 1 + # Commit and push to the web branch git add . git commit -m "Update web branch with documentation" git push origin web --force