Created
August 4, 2021 10:02
-
-
Save kunathj/93dd857ca9f26341206a0ad7df482ecc to your computer and use it in GitHub Desktop.
github workflows
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: LaTeX build | |
on: | |
push: | |
branches-ignore: | |
- 'gh-action-result/pdflatex' | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Compile the presentation | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: presentation.tex | |
latexmk_shell_escape: true | |
- name: Compile the proceedings | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: proceedings.tex | |
latexmk_shell_escape: true | |
- name: Commit to orphan branch | |
run: | | |
git checkout --orphan gh-action-result/pdflatex | |
git rm -rf . | |
git checkout master README.md | |
git add presentation.pdf README.md | |
git -c user.name='GitHub Action' -c user.email='action@github.com' commit -m "Built paper" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-action-result/pdflatex | |
force: true |
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: pre-commit | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
precommit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- run: python -m pip install --upgrade pip wheel | |
- run: python -m pip install pre-commit | |
- run: pre-commit run -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment