Skip to content

Update main.yaml

Update main.yaml #331

Workflow file for this run

on:
push:
branches:
[main]
schedule:
- cron: '0 0 1,15 * *' # Runs at 00:00 UTC on the 1st and 15th of each month
name: Render
permissions:
contents: write
pages: write
jobs:
bookdown:
name: GH-Pages
runs-on: ubuntu-latest
container: ghcr.io/geocompx/minimal:latest
defaults:
run:
shell: bash -l {0}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Install cargo
run: |
sudo apt-get update
sudo apt-get install -y cargo optipng
- name: Install R deps (for readers)
run: |
Rscript -e "install.packages('tmapbook',
repos = c('https://geocompx.r-universe.dev',
'https://cloud.r-project.org'))"
- name: Install R deps (for book building)
uses: r-lib/actions/setup-r-dependencies@v2
with:
install-quarto: true
quarto-version: 1.7.31
cache-version: 2
packages: |
any::curl
any::dplyr
any::formatR
any::spData
any::tidyr
any::kableExtra
any::tinytable
any::webshot
#- name: Get Quarto
# uses: quarto-dev/quarto-actions/setup@v2
# with:
# version: 1.7.31
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
# - name: Publish to GitHub Pages (and render)
# uses: quarto-dev/quarto-actions/publish@v2
# with:
# target: gh-pages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
commit_message: 'Deploy commit: ${{ github.event.head_commit.message }}'