Merge branch 'master' of github.com:bss-osca/tfa #226
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
on: | |
push: | |
branches: [main, master] | |
# branches-ignore: | |
# - '**' | |
name: Render book (Ubuntu) | |
jobs: | |
Render-book-ubuntu: | |
runs-on: ubuntu-latest | |
env: | |
RGL_USE_NULL: true | |
BING_MAPS_API_KEY: ${{ secrets.BING_MAPS_KEY }} | |
GGMAP_GOOGLE_API_KEY: ${{ secrets.GGMAP_GOOGLE_KEY }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install dependencies | |
run: sudo apt install libcurl4-openssl-dev libssl-dev libharfbuzz-dev libfribidi-dev libgdal-dev libglpk-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Install R stuff | |
run: | | |
R -e 'icons::download_fontawesome()' | |
- name: Cache bookdown results | |
uses: actions/cache@v4 | |
with: | |
path: _bookdown_files | |
key: bookdown-${{ hashFiles('**/*Rmd') }} | |
restore-keys: bookdown- | |
- name: Render book | |
run: Rscript book/render_book.R | |
- name: Commit results | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Lars Relund" | |
git add . | |
git commit --allow-empty -am 'gHA build: ${{github.run_number}}' || echo "No changes to commit" | |
git pull --rebase | |
git push https://${{github.actor}}:${{secrets.token}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to commit" |