Update latex.yml #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compile and host pdf of resume | |
# 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" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# replace with the name of the LaTeX file to compile and host | |
env: | |
NAME_OF_LATEX_FILE: matthew_oley_resume | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
container: | |
image: registry.gitlab.com/islandoftex/images/texlive:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install poppler-utils | |
run: apt-get update && apt-get install -y poppler-utils | |
- name: compile resume | |
run: | | |
mkdir public | |
pdflatex -output-directory public $NAME_OF_LATEX_FILE.tex | |
pdftoppm -singlefile -png public/$NAME_OF_LATEX_FILE.pdf $NAME_OF_LATEX_FILE | |
mv $NAME_OF_LATEX_FILE.png public | |
- name: add index.html | |
run: mv ./index.html ./public/index.html | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './public' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |