whoami/.gitea/workflows/build.yml
Yigit Colakoglu bcc402146a
Some checks failed
Build CV / build-pdf (push) Failing after 1m59s
upload action
2025-09-02 10:02:13 +02:00

48 lines
1.1 KiB
YAML

name: Build CV
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-pdf:
runs-on: ubuntu-latest
container: texlive/texlive:latest
steps:
- name: Install node :(
run: |
apt update -y
apt install -y npm
- name: Checkout repository
uses: actions/checkout@v4
- name: Build PDF
run: make pdf
- name: Upload PDF artifact
uses: actions/upload-artifact@v3
with:
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