title: How do I access the root of the GitHub Repository in a GitHub action?
body: <p>I am trying to build a resume pdf from a <code>resume.tex</code> in my resume <a href="https://github.com/adityamwagh/resume" rel="nofollow noreferrer">repository</a> file whenever a commit is made.</p>
  <p>I am getting the following error.</p>
  <pre class="lang-sh prettyprint-override"><code>Error:  File '/home/runner/work/resume/resume/resume.tex' cannot be found from the directory '/github/workspace'.
  </code></pre>
  <p>How should I access the <code>resume.tex</code> file? If I just say <code>root_file: resume.tex</code>, the error is:</p>
  <pre class="lang-sh prettyprint-override"><code>Error:  File 'resume.tex' cannot be found from the directory '/github/workspace'.
  </code></pre>
  <p>The <code>.github/workflows/build_resume.yml</code> file looks like this. The <code>resume.tex</code> file is in the root of my <a href="https://github.com/adityamwagh/resume" rel="nofollow noreferrer">repository</a>.</p>
  <pre class="lang-yaml prettyprint-override"><code># This is a basic workflow to help you get started with Actions
  
  name: Build PDF on commit.
  
  # Controls when the workflow will run
  on:
    # Triggers the workflow on push or pull request events but only for the main branch
    push:
      branches: [ main ]
  
    # Allows you to run this workflow manually from the Actions tab
  #   workflow_dispatch: 
  
  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  jobs:
    # This workflow contains a single job called &quot;build&quot;
    build:
      # The type of runner that the job will run on
      runs-on: ubuntu-latest
  
      # Steps represent a sequence of tasks that will be executed as part of the job
      steps:
        - name: Github Action for LaTeX
          uses: xu-cheng/latex-action@v2
          with:
            # The root LaTeX file to be compiled
            root_file: ${{ github.workspace }}/resume.tex
            # Interpret the root_file input as bash glob pattern
  #           glob_root_file: # optional
            # The working directory for this action
  #           working_directory: # optional
            # The LaTeX engine to be invoked
  #           compiler: # optional, default is latexmk
            # Extra arguments to be passed to the LaTeX engine
  #           args: # optional, default is -pdf -file-line-error -halt-on-error -interaction=nonstopmode
            # [Deprecated] Install extra packages by tlmgr
  #           extra_packages: # optional
            # Install extra packages by apk
  #           extra_system_packages: # optional
            # Install extra .ttf/.otf fonts.
  #           extra_fonts: ./fonts/*.ttf
            # Arbitrary bash codes to be executed before compiling LaTeX documents
            pre_compile: tlmgr update --self &amp;&amp; tlmgr update --all
            # Arbitrary bash codes to be executed after compiling LaTeX documents
            post_compile: latexmk -c
            # Instruct latexmk to enable --shell-escape
  #           latexmk_shell_escape: # optional
            # Instruct latexmk to use LuaLaTeX
  #           latexmk_use_lualatex: # optional
            # Instruct latexmk to use XeLaTeX
            latexmk_use_xelatex: true
  
  </code></pre>