Merge pull request #42 from jepusto/luke-edit-chap7 #34
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
| on: | |
| push: | |
| branches: | |
| - main | |
| name: Render-and-deploy | |
| jobs: | |
| bookdown: | |
| name: Render-Book | |
| if: "! contains(github.event.head_commit.message, '[skip build]')" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Set up pandoc | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Set up renv | |
| uses: r-lib/actions/setup-renv@v2 | |
| - name: Render web book | |
| run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")' | |
| - name: Set up tinytex | |
| uses: r-lib/actions/setup-tinytex@v2 | |
| env: | |
| TINYTEX_INSTALLER: TinyTeX | |
| - name: Check latex installation | |
| run: tlmgr --version | |
| - name: Render pdf book | |
| run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")' | |
| - name: Render epub book | |
| run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::epub_book")' | |
| - name: deploy to github pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GH_PAT }} | |
| folder: _book | |
| branch: gh-pages |