diff --git a/.github/.gitignore b/.github/.gitignore deleted file mode 100644 index 2d19fc7..0000000 --- a/.github/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.html diff --git a/.github/workflows/bookdown-build-and-deploy.yml b/.github/workflows/bookdown-build-and-deploy.yml new file mode 100644 index 0000000..27a4e52 --- /dev/null +++ b/.github/workflows/bookdown-build-and-deploy.yml @@ -0,0 +1,16 @@ +name: Déploiement de parcours_r_module6_publications_reproductibles + +on: + push: + branches: + - main + - master + + workflow_dispatch: + +jobs: + build-and-deploy-bookdown: + name: Build and bookdown + uses: MTES-MCT/parcours-r/.github/workflows/bookdown-build-from-desc-and-deploy.yml@master + with: + r_version: '4.4.1' diff --git a/.github/workflows/bookdown-build.yml b/.github/workflows/bookdown-build.yml new file mode 100644 index 0000000..ebbff51 --- /dev/null +++ b/.github/workflows/bookdown-build.yml @@ -0,0 +1,14 @@ +name: Test compilation de parcours_r_module6_publications_reproductibles + +on: + pull_request: + branches: [main, master, dev, dev-ci, 36-CI] + + workflow_dispatch: + +jobs: + build-bookdown: + name: Build bookdown + uses: MTES-MCT/parcours-r/.github/workflows/bookdown-build-from-desc.yml@master + with: + r_version: '4.4.1' diff --git a/.github/workflows/deploy_bookdown.yml b/.github/workflows/deploy_bookdown.yml deleted file mode 100644 index 700a0fe..0000000 --- a/.github/workflows/deploy_bookdown.yml +++ /dev/null @@ -1,78 +0,0 @@ -on: - push: - branches: - - main - - master - -env: - RENV_PATHS_ROOT: ~/.local/share/renv - - -name: renderbook - -jobs: - bookdown: - name: Render-Book - runs-on: macOS-latest - steps: - - - name: Checkout repo - uses: actions/checkout@v2 - - - name: Setup R - uses: r-lib/actions/setup-r@master - - - name: Install pandoc - run: | - brew install pandoc - - - name: Cache Renv packages - uses: actions/cache@v2 - with: - path: $HOME/.local/share/renv - key: r-${{ hashFiles('renv.lock') }} - restore-keys: r- - - - name: Cache bookdown results - uses: actions/cache@v2 - with: - path: _bookdown_files - key: bookdown-${{ hashFiles('**/*Rmd') }} - restore-keys: bookdown- - - - name: Install packages - run: | - R -e 'install.packages("renv")' - R -e 'renv::restore()' - - - name: Build site - run: Rscript -e 'bookdown::render_book("index.Rmd", quiet = TRUE)' - - - uses: actions/upload-artifact@v1 - with: - name: _book - path: _book/ - -# Need to first create an empty gh-pages branch -# see https://pkgdown.r-lib.org/reference/deploy_site_github.html -# and also add secrets for a GH_PAT and EMAIL to the repository -# gh-action from Cecilapp/GitHub-Pages-deploy - checkout-and-deploy: - runs-on: ubuntu-latest - needs: bookdown - steps: - - name: Checkout - uses: actions/checkout@master - - name: Download artifact - uses: actions/download-artifact@v1.0.0 - with: - # Artifact name - name: _book # optional - # Destination path - path: _book # optional - - name: Deploy to GitHub Pages - uses: Cecilapp/GitHub-Pages-deploy@master - env: - EMAIL: ${{ secrets.EMAIL }} # must be a verified email - GH_TOKEN: ${{ secrets.GH_PAT }} # https://github.com/settings/tokens - BUILD_DIR: _book/ # "_site/" by default diff --git a/.github/workflows/rstudio-image-build.yml b/.github/workflows/rstudio-image-build.yml new file mode 100644 index 0000000..1f30a17 --- /dev/null +++ b/.github/workflows/rstudio-image-build.yml @@ -0,0 +1,31 @@ +name: Image docker parcours_r_module6_publications_reproductibles + +on: + push: + branches: + - main + - master + - dev + - 36-CI + paths: + - .github/workflows/rstudio-image-build.yml + - Dockerfile + - DESCRIPTION + + pull_request: + types: + - created + branches: + - main + - master + - dev + paths: + - .github/workflows/rstudio-image-build.yml + - Dockerfile + - DESCRIPTION + + workflow_dispatch: + +jobs: + build-rstudio-image: + uses: MTES-MCT/parcours-r/.github/workflows/rstudio-image-build.yml@master diff --git a/.gitignore b/.gitignore index c30d1ca..6276962 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ _book _bookdown_files *.html -support-documents-reproductibles.Rmd \ No newline at end of file +support-documents-reproductibles.Rmd +archives_docs_compiles/ diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..21ff96d --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,42 @@ +Type: Book +Package: Parcours-R-M6 +Title: Parcours R M6 Publications Reproductibles avec RMarkdown +Version: 0.1.0 +Description: Valise pédagogique pour le module 6 du parcours R : Publications Reproductibles avec RMarkdown +License: MIT +URL: https://github.com/MTES-MCT/parcours_r_module_publication_rmarkdown +Encoding: UTF-8 +RoxygenNote: 7.2.3 +Imports: + COVID19, + dplyr, + COGiter, + emo, + ggplot2, + gouvdown, + gouvdown.fonts, + glue, + htmltools, + kableExtra, + knitr, + lubridate, + metathis, + pagedown, + readr, + rmarkdown, + savoirfR, + scales, + showtext, + stringi, + tidyr, + tidyverse, + tinytex, + xaringan, + xaringanExtra, + xaringanthemer +Remotes: + hadley/emo, + MaelTheuliere/COGiter, + MTES-MCT/savoirfR, + spyrales/gouvdown, + spyrales/gouvdown.fonts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b4202c8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +ARG R_VERSION=4.4.1 + +FROM inseefrlab/onyxia-rstudio:r${R_VERSION} +RUN apt-get update && apt-get install -y cargo +RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))" +COPY DESCRIPTION DESCRIPTION +RUN R -e 'remotes::install_deps(dependencies = TRUE)' diff --git a/_bookdown.yml b/_bookdown.yml index 1bb5eb6..f556294 100644 --- a/_bookdown.yml +++ b/_bookdown.yml @@ -1,4 +1,4 @@ -book_filename: "support-documents-reproductibles" +book_filename: "M6_Publications_reproductibles_avec_RMarkdown" delete_merged_file: TRUE language: ui: diff --git a/_output.yml b/_output.yml deleted file mode 100644 index 7ea874f..0000000 --- a/_output.yml +++ /dev/null @@ -1,16 +0,0 @@ -bookdown::gitbook: - css: 'assets/style.css' - config: - toc: - before: | -
-
-