Compile LaTeX #21544
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 LaTeX | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: 0 * * * * | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
persistent-credentials: false | |
fetch-depth: 0 | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install asymptote | |
sudo apt-get install ghostscript | |
sudo apt-get install freeglut3 | |
sudo apt-get install texlive | |
sudo apt-get install texlive-latex-extra | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get autoremove | |
- name: Build SymPy | |
run: | | |
pip install sympy | |
- name: Run Python scripts | |
run: | | |
cd 'Problem 3' | |
python3 transition.py | |
python3 transition_2.py | |
python3 transition_3.py | |
python3 transition_4.py | |
python3 transition_5.py | |
sudo rm -rf __pycache__ | |
- name: LaTeX | |
run: | | |
sudo apt-get install latexmk | |
cd 'Problem 3' | |
rm 'solution3-1.tex' | |
latexmk -pdf -f solution3.tex | |
latexmk -c | |
- name: Commit files | |
run: | | |
sudo rm -rf sympy | |
sudo rm -rf cpython | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git commit -m "add compiled files" | |
- name: Push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |