Rename prime-irrational-analogy.tex to prime_irrational_analogy.tex #6
This file contains hidden or 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 LaTeX Papers | |
| on: | |
| push: | |
| paths: | |
| - '**.tex' | |
| - '.github/workflows/build-latex.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build-pdfs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # ======== 1つ目: prime_irrational_paper.tex ======== | |
| - name: Build prime_irrational_paper.pdf | |
| uses: xu-cheng/latex-action@v3 | |
| with: | |
| root_file: prime_irrational_paper.tex | |
| latexmk_use_lualatex: false | |
| latexmk_shell_escape: true | |
| - name: Upload paper PDF as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: prime_irrational_paper | |
| path: prime_irrational_paper.pdf | |
| # ======== 2つ目: prime_irrational_analogy.tex ======== | |
| - name: Build prime_irrational_analogy.pdf | |
| uses: xu-cheng/latex-action@v3 | |
| with: | |
| root_file: prime_irrational_analogy.tex | |
| latexmk_use_lualatex: false | |
| latexmk_shell_escape: true | |
| - name: Upload analogy PDF as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: prime_irrational_analogy | |
| path: prime_irrational_analogy.pdf | |
| # ======== 両方まとめてコミット ======== | |
| - name: Commit PDFs back to repository | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add prime_irrational_paper.pdf prime_irrational_analogy.pdf | |
| git commit -m "Auto-build PDFs from LaTeX [skip ci]" || echo "No changes to commit" | |
| git push | |
| permissions: | |
| contents: write |