diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d387b87..bfa253b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -29,3 +29,19 @@ jobs: name: curriculum-vitae path: main.pdf retention-days: 30 + + - name: Deploy to pdf-artifacts branch + if: github.ref == 'refs/heads/main' + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git fetch origin pdf-artifacts + git checkout pdf-artifacts + cp main.pdf . + git add main.pdf + if git diff --staged --quiet; then + echo "No changes to commit" + else + git commit -m "Update CV PDF from commit ${{ github.sha }}" + git push origin pdf-artifacts + fi