diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e07f2c562ee28448a33fcd1c8c119969d87511d..73b3e1570134ceba23769f07d3169f49414e7c8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,73 +8,56 @@ variables: cache: key: global-cache paths: - - ${R_LIBS} + - ${R_LIBS} stages: - - build - pkgdown - pkgdown-move - deploy -building: - stage: build - script: - - apt-get update -qq && apt-get install -y libharfbuzz-dev libfribidi-dev - - echo "Library path for packages :" $R_LIBS - - mkdir -p $R_LIBS - - Rscript -e 'install.packages("remotes")' - - Rscript -e 'install.packages("rcmdcheck")' - - Rscript -e 'remotes::install_local(upgrade = "never")' - - Rscript -e 'remotes::install_git("https://gitlab-forge.din.developpement-durable.gouv.fr/dreal-pdl/csd/data.captages.git")' - - R -e 'rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "warning", check_dir = "check")' - - ls -la - - mkdir -p public - - ls -la public - - ls -la $R_LIBS - integration: - stage: pkgdown - allow_failure: true - when: on_success - only: - - main - script: - - Rscript -e 'remotes::install_cran(c("pkgdown"), upgrade = "never")' - - Rscript -e 'pkgdown::build_site()' - artifacts: - paths: - - docs - expire_in: 30 days + stage: pkgdown + allow_failure: true + when: on_success + only: + - main + script: + - Rscript -e 'remotes::install_cran("pkgdown", upgrade = "never")' + - Rscript -e 'pkgdown::build_site()' + artifacts: + paths: + - docs + expire_in: 30 days integration-main: - stage: pkgdown-move - dependencies: - - integration - only: - - main - script: - - mkdir -p public - - echo "test file" > public/test.txt - - 'curl --location --output artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/main/download?job=pages" && - unzip artifacts.zip && - rm artifacts.zip && - echo "copied main artifacts" || - echo "copied main artifacts failed"' - - ls -la docs || echo "Docs directory does not exist or is empty" - - cp -r docs/* public || echo "No files to copy" - - ls -la public - artifacts: - paths: - - public - expire_in: 30 days + stage: pkgdown-move + dependencies: + - integration + only: + - main + script: + - mkdir -p public + - echo "test file" > public/test.txt + - 'curl --location --output artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/main/download?job=pages" && + unzip artifacts.zip && + rm artifacts.zip && + echo "copied main artifacts" || + echo "copied main artifacts failed"' + - ls -la docs || echo "Docs directory does not exist or is empty" + - cp -r docs/* public || echo "No files to copy" + - ls -la public + artifacts: + paths: + - public + expire_in: 30 days pages: - stage: deploy - script: - - echo "deployment with cache" - - ls -la public || echo "Public directory does not exist" - artifacts: - paths: - - public - only: - - main + stage: deploy + script: + - echo "deployment with cache" + - ls -la public || echo "Public directory does not exist" + artifacts: + paths: + - public + only: + - main diff --git a/dev/flat_update_station_esu.Rmd b/dev/flat_update_station_esu.Rmd index e2e624e9563e93995d8f65dd9645b0de9d0b0f6f..379221c5a03b0fa90bda2ef5151524a21958e8f0 100644 --- a/dev/flat_update_station_esu.Rmd +++ b/dev/flat_update_station_esu.Rmd @@ -11,6 +11,7 @@ library(dplyr) library(sf) library(collectr) library(usethis) +library(nngeo) ``` ```{r development-load} @@ -372,8 +373,6 @@ datalibaba::post_dico_attr(dico = station_esu_comments, ) ``` -## Mise à jour du skeleton - ```{r development-create-template, eval=FALSE} # Créer l'arborescence et les fichiers du template usethis::use_rmarkdown_template( diff --git a/inst/rmarkdown/templates/update_station_esu/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/update_station_esu/skeleton/skeleton.Rmd index e2e624e9563e93995d8f65dd9645b0de9d0b0f6f..e9d45606a724150651909b2d2a85ef2f9e2afd4c 100644 --- a/inst/rmarkdown/templates/update_station_esu/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/update_station_esu/skeleton/skeleton.Rmd @@ -11,6 +11,7 @@ library(dplyr) library(sf) library(collectr) library(usethis) +library(nngeo) ``` ```{r development-load} diff --git a/vignettes/mise-a-jour-des-stations-esu.Rmd b/vignettes/mise-a-jour-des-stations-esu.Rmd index 30a0e36fd961ee160366298b7f78a1078e78ea1e..ac1414d9261f4acbb5979ed28e91d0cd53656e2a 100644 --- a/vignettes/mise-a-jour-des-stations-esu.Rmd +++ b/vignettes/mise-a-jour-des-stations-esu.Rmd @@ -459,6 +459,5 @@ datalibaba::post_dico_attr(dico = station_esu_comments, ``` -## Mise à jour du skeleton