I am trying to use GitHub Actions to deploy a PDF built from a .tex
file to GitHub Pages. The YAML file is available here:
name: Build and Deploy LaTeX document
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
- uses: xu-cheng/[email protected]
with:
root_file: main.tex
- uses: actions/[email protected]
with:
name: main-pdf
path: main.pdf
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/[email protected]
with:
name: main-pdf
path: .
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: .
- uses: actions/[email protected]
with:
token: ${{ secrets.GH_PAT }}
artifact_name: main.pdf
I am having some issues related to the deploying phase, since the PDF file is not found:
name: Build and Deploy LaTeX document
permissions: write-all
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: xu-cheng/[email protected]
with:
root_file: main.tex
- uses: docker://ghcr.io/michal-h21/make4ht-action:latest
env:
command: "make4ht -d out main.tex"
- run: |
cd out
sudo mv main.html index.html
- uses: actions/[email protected]
with:
name: main-pdf
path: main.pdf
- uses: softprops/[email protected]
with:
tag_name: Current
files: main.pdf
- uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GH_PAT }}
publish_dir: ./out