deploy targets releases #17
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
name: deploy targets releases | |
on: | |
schedule: | |
- cron: "0 17 * * SUN" | |
workflow_dispatch: | |
jobs: | |
deploy-targets-releases: | |
runs-on: ubuntu-latest | |
container: rocker/tidyverse:4.4.1 | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: | | |
apt-get update && apt-get install -y --no-install-recommends \ | |
libxt6 libglpk-dev libpoppler-cpp-dev libmagick++-dev \ | |
libtesseract-dev libleptonica-dev tesseract-ocr-eng | |
- name: Trust git repo | |
run: | | |
git config --global --add safe.directory /__w/paglaom/paglaom | |
- name: Install packages from renv.lock (with cache) | |
if: ${{ !env.ACT }} | |
uses: r-lib/actions/setup-renv@v2 | |
with: | |
cache-version: 2 | |
- name: Install packages from renv.lock (local, no cache) | |
if: ${{ env.ACT }} | |
run: | | |
renv::restore() | |
shell: Rscript {0} | |
- name: Run workflows | |
run: | | |
targets::tar_make(climate_download_files) | |
targets::tar_make(cyclone_reports_download_files) | |
targets::tar_make(dam_level_data_raw_csv) | |
targets::tar_make(forecasts_download_files) | |
targets::tar_make(forecasts_agriculture_download_files) | |
shell: Rscript {0} | |
- name: Create weekly data release | |
run: | | |
targets::tar_make(paglaom_weekly_release) | |
shell: Rscript {0} | |