-
Notifications
You must be signed in to change notification settings - Fork 89
62 lines (56 loc) · 2.34 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: SDS
on:
workflow_dispatch:
push:
branches: main
pull_request:
branches: main
schedule:
- cron: "0 4 * * *"
env:
registry: my_registry_name
DB_HOST: localhost
DB_USERNAME: postgres
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
services:
postgres:
image: postgis/postgis
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: postgis
ALLOW_IP_RANGE: '*'
ports:
- 5432:5432
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.2'
use-public-rspm: true
- run: /usr/bin/sudo apt install libudunits2-dev libgdal-dev libgeos-dev libproj-dev libglpk-dev libpq-dev
- run: R -q -e 'install.packages(c("dbscan", "downlit", "cubelyr", "gstat", "hglm", "igraph", "lme4", "lmtest", "maps", "mapview", "matrixStats", "mgcv", "R2BayesX", "remotes", "rnaturalearth", "rnaturalearthdata", "RPostgres", "sf", "spatstat", "spatialreg", "spdep", "spData", "stars", "tidyverse", "viridis", "xml2", "BH"))'
- run: wget https://cran.r-project.org/src/contrib/Archive/rgeoda/rgeoda_0.0.10-4.tar.gz
- run: R CMD INSTALL rgeoda*gz
- run: R -q -e 'options(timeout = 600); install.packages("tmap", repos = c("https://r-tmap.r-universe.dev", "https://cloud.r-project.org"))'
- run: R -q -e 'options(timeout = 600); install.packages("spDataLarge", repos = "https://nowosad.github.io/drat/", type = "source")'
- run: R -q -e 'options(timeout = 3600); install.packages("starsdata", repos = "https://cran.uni-muenster.de/pebesma", type = "source")'
- run: R -q -e 'options(timeout = 3600); install.packages("INLA", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/stable"))'
- run: wget -q https://uni-muenster.sciebo.de/s/8mEbeHPOX9GdAYn/download -O sds.zip
- run: unzip -q sds.zip
- run: cp -rp sds/aq .
- run: rm -fr sds
- name: Render and Publish
if: github.event_name != 'pull_request'
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}