From 984acefbd4985dba6aa1044189fcec9b2eb2ea2d Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Fri, 17 Sep 2021 11:52:08 -0400 Subject: [PATCH 1/5] switched to a different latex builder --- .github/workflows/buildlatex.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildlatex.yml b/.github/workflows/buildlatex.yml index 6768722..84e106f 100644 --- a/.github/workflows/buildlatex.yml +++ b/.github/workflows/buildlatex.yml @@ -7,7 +7,7 @@ jobs: - name: Set up Git repository uses: actions/checkout@v2 - name: Compile LaTeX document - uses: dante-ev/latex-action@latest + uses: xu-cheng/latex-action@latest with: root_file: DynamicalBook.tex working_directory: book From 233e86c9e1705f3be18aea2b14976f0e3d296bc8 Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Fri, 17 Sep 2021 12:04:12 -0400 Subject: [PATCH 2/5] fixed version --- .github/workflows/buildlatex.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildlatex.yml b/.github/workflows/buildlatex.yml index 84e106f..5eb3fb5 100644 --- a/.github/workflows/buildlatex.yml +++ b/.github/workflows/buildlatex.yml @@ -7,7 +7,7 @@ jobs: - name: Set up Git repository uses: actions/checkout@v2 - name: Compile LaTeX document - uses: xu-cheng/latex-action@latest + uses: xu-cheng/latex-action@v2 with: root_file: DynamicalBook.tex working_directory: book From 7f6bd948bc7a279fa9f1602ee85db91b88164940 Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Fri, 17 Sep 2021 12:05:43 -0400 Subject: [PATCH 3/5] fixed pygments --- .github/workflows/buildlatex.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildlatex.yml b/.github/workflows/buildlatex.yml index 5eb3fb5..58c89c9 100644 --- a/.github/workflows/buildlatex.yml +++ b/.github/workflows/buildlatex.yml @@ -12,7 +12,7 @@ jobs: root_file: DynamicalBook.tex working_directory: book args: -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -latexoption=-shell-escape - extra_system_packages: python-pygments + extra_system_packages: py-pygments - name: Uploads the document uses: actions/upload-artifact@v2 with: From 3b21e046e53cf14d8135034d92790f5e59a21cba Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Fri, 17 Sep 2021 14:36:24 -0400 Subject: [PATCH 4/5] fixed deploy part --- .github/workflows/buildlatex.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildlatex.yml b/.github/workflows/buildlatex.yml index 58c89c9..134ce9d 100644 --- a/.github/workflows/buildlatex.yml +++ b/.github/workflows/buildlatex.yml @@ -20,7 +20,8 @@ jobs: path: book/DynamicalBook.pdf - run: mkdir build - run: cp book/DynamicalBook.pdf build/ - - uses: maxheld83/ghpages@v0.3.0 - env: - BUILD_DIR: build/ - GH_PAT: ${{ secrets.GH_PAT }} + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build From 8937c8ade26b04cc3dc51810d00ed0993bf8a2f0 Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Fri, 17 Sep 2021 15:05:18 -0400 Subject: [PATCH 5/5] only pushing to master triggers deploy, PR just builds --- .github/workflows/build.yml | 22 +++++++++++++++++++ .../workflows/{buildlatex.yml => deploy.yml} | 6 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{buildlatex.yml => deploy.yml} (95%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f9237e5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build LaTeX document +on: + pull_request: + +jobs: + build_latex: + runs-on: ubuntu-latest + steps: + - name: Set up Git repository + uses: actions/checkout@v2 + - name: Compile LaTeX document + uses: xu-cheng/latex-action@v2 + with: + root_file: DynamicalBook.tex + working_directory: book + args: -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -latexoption=-shell-escape + extra_system_packages: py-pygments + - name: Uploads the document + uses: actions/upload-artifact@v2 + with: + name: DynamicalBook + path: book/DynamicalBook.pdf diff --git a/.github/workflows/buildlatex.yml b/.github/workflows/deploy.yml similarity index 95% rename from .github/workflows/buildlatex.yml rename to .github/workflows/deploy.yml index 134ce9d..a09ef0e 100644 --- a/.github/workflows/buildlatex.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,9 @@ name: Build LaTeX document -on: [push] +on: + push: + branches: + - master + jobs: build_latex: runs-on: ubuntu-latest