Files
cv/.gitea/workflows/compile.yml
Daniel Heras Quesada f42cf7dc70
Some checks failed
Compile CV / PDF (push) Has been cancelled
Compile CV / Readme (push) Has been cancelled
Compile CV / Commit (push) Has been cancelled
Compile CV / Release (push) Has been cancelled
gitea refs reset
2025-12-21 23:08:49 +01:00

85 lines
2.0 KiB
YAML

name: Compile CV
on:
push:
branches:
- 'main'
permissions:
contents: write
jobs:
pdf:
name: PDF
runs-on: ubuntu-latest
steps:
- name: Checkout into git repository
uses: actions/checkout@v4
- name: Compile CV LaTeX to PDF
uses: xu-cheng/latex-action@v3
with:
root_file: cv.tex
- name: Upload CV
uses: actions/upload-artifact@v4
with:
name: cv_upload
path: cv.pdf
md:
name: Readme
runs-on: ubuntu-latest
container:
image: pandoc/latex:latest
steps:
- uses: actions/checkout@v3
- name: Compiles project to Markdown for the README
run: pandoc ./cv.tex -s -o README.rst
- name: Upload README
uses: actions/upload-artifact@v4
with:
name: readme_upload
path: README.rst
commit:
name: Commit
needs: [ "md", "pdf" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: readme_download
uses: actions/download-artifact@v5
with:
name: readme_upload
- name: cv_download
uses: actions/download-artifact@v5
with:
name: cv_upload
- name: Display folder
run: ls -R
- name: Set git identity
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "[BOT] 🤖 Automated README"
- name: Push
run: |
git remote set-url origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}
git push
release:
name: Release
needs: [ "commit" ]
runs-on: ubuntu-latest
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes