Skip to content

Instantly share code, notes, and snippets.

@matthewfeickert
Created March 5, 2021 23:26
Show Gist options
  • Save matthewfeickert/ebbe8582c5c523c14bcb78e06ff1f9a1 to your computer and use it in GitHub Desktop.
Save matthewfeickert/ebbe8582c5c523c14bcb78e06ff1f9a1 to your computer and use it in GitHub Desktop.
GitHub Actions workflow YAML to deploy a built document to a gh-pages branch for viewing through the web
name: Deploy build
on:
push:
branches:
- main
tags:
- v*
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Compile LaTeX documents
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make
make document
- name: List directory contents
run: ls -lhtra
- name: Setup build for deployment
run: |
mkdir -p docs/_build
cp your-built-paper.pdf docs/_build/your-built-paper.pdf
- name: Deploy build to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment