attempting to fix binder image #321
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: | |
workflow_dispatch: | |
push: | |
branches: [main, action-test] | |
name: Quarto Publish | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
tinytex: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install libudunits2-dev libgdal-dev libgeos-dev libproj-dev | |
- name: Install R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Java setup | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
java-package: jdk | |
- name: Java reconf | |
run: sudo R CMD javareconf | |
- name: Install R Dependencies | |
uses: r-lib/actions/setup-renv@v2 | |
- name: Restore _freeze | |
uses: actions/cache@v3 | |
with: | |
path: _freeze | |
key: freeze-${{ runner.os }}-${{ github.run_id }} | |
restore-keys: freeze-${{ runner.os }}- | |
- name: Restore English _freeze | |
uses: actions/cache@v3 | |
with: | |
path: en_freeze | |
key: en-freeze-${{ runner.os }}-${{ github.run_id }} | |
restore-keys: en-freeze-${{ runner.os }}- | |
- name: Render book | |
run: Rscript bilingual_render.R | |
- name: Publish | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Quarto GHA Workflow Runner" | |
git fetch | |
git restore renv/activate.R | |
git checkout gh-pages | |
cp -r _book/* . | |
git add -u | |
git add pt | |
git add *files/figure-html/*.png | |
git commit -m "Built site for gh-pages" | |
git push | |
git checkout main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |