rbarazzutti / gitinfo2-latexmk

Use LaTeX's gitinfo2 with almost no effort
LaTeX Project Public License v1.3c
9 stars 3 forks source link

Working on github actions #3

Closed lrnv closed 2 years ago

lrnv commented 2 years ago

I have troubles making this work on github actions ? I have a github action that looks like :

---
name: "Release pdf"

on:
  push:
    branches:
      - "master"

jobs:
  release_cv:
    name: "Release CV"
    runs-on: ubuntu-latest
    steps:
    - name: Checkout master
      uses: actions/checkout@v1
    - name: Compile CV
      uses: xu-cheng/latex-action@master
      with:
        root_file: CV.tex
    - name: Check pdf file
      run: |
        file CV.pdf | grep -q ' PDF '
    - name: "Upload"
      uses: "marvinpinto/action-automatic-releases@latest"
      with:
        repo_token: "${{ secrets.GITHUB_TOKEN }}"
        automatic_release_tag: "latest"
        prerelease: true
        title: "Build"
        files: |
          CV.pdf

which is supposed to release my CV online. It works great, and since it runs on github actions Hooks are not possible.

Adding do './tex/gitinfo2.pm'; to my .latexmkrc only yields :

sh: git: not found
sh: git: not found
sh: git: not found

while running gitinfo2.pm. I suppose this is because standard git commands do not work in a github action context. Do you think there is still something we can do ?

lrnv commented 2 years ago

Nevermind, I just installed perl and ran do './tex/gitinfo2.pm before running latexmk, writting things in gitHeadLocal.gin instead of .git/.... It worked like a charm.