Render PDFs #16
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: Build | |
run-name: Render PDFs | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build LaTeX project and generate PDFs | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: "*.tex" | |
glob_root_file: true | |
- name: Upload PDFs as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDF | |
path: "*.pdf" | |
- name: Upload PDFs as release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: Current state of PDFs | |
name: Latest PDFs | |
tag_name: current | |
files: "*.pdf" | |
- name: Prepare files for gh-pages | |
run: | | |
mkdir -p public | |
mv *.pdf public/ | |
- name: Publish PDFs to gh-pages branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |