diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index 20593214..87741e40 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -68,10 +68,22 @@ jobs: - name: Build documentation shell: bash run: bash make_doc.sh - - name: Tag-only step + - name: Upload documentation if: github.ref_type == 'tag' shell: bash - run: echo "This runs only when the workflow is triggered by a tag" + run: | + git checkout --orphan gitea-pages + git reset --hard + # Remove everything except .git and public + git clean -fdx -e public -e .git + + # Move public contents to root and remove the now-empty public dir + shopt -s dotglob nullglob + mv public/* . + rm -rf public + git add . + git commit -m "Deploy site" + git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages gpu-test: name: GPU test runs-on: jfjoch_rocky8