Skip to content

Update main.yml

Update main.yml #28

Workflow file for this run

name: Build and Deploy LaTeX document
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
- name: Upload PDF as artifact
uses: actions/upload-artifact@v3
with:
name: main-pdf
path: main.pdf
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
token: ${{ secrets.GH_PAT }}
- name: Download PDF artifact
uses: actions/download-artifact@v3
with:
name: main-pdf
path: .
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1
with:
token: ${{ secrets.GH_PAT }}
branch: gh-pages
folder: .