Skip to content

Commit

Permalink
Deploy translated site
Browse files Browse the repository at this point in the history
  • Loading branch information
carpentries-bot committed Oct 10, 2024
1 parent 2272c27 commit 94322db
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/sandpaper-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- master
- l10n_main
schedule:
- cron: '0 0 * * 2'
workflow_dispatch:
Expand Down Expand Up @@ -32,7 +33,9 @@ jobs:
steps:

- name: "Checkout Lesson"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: l10n_main

- name: "Set up R"
uses: r-lib/actions/setup-r@v2
Expand All @@ -53,9 +56,21 @@ jobs:
with:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Create and populate .Renviron file with LANG_CODE secret
run: |
echo "LANG_CODE=${{ secrets.LANG_CODE }}" >> ~/.Renviron
- name: "Deploy Site"
run: |
reset <- "${{ github.event.inputs.reset }}" == "true"
options(repos = c(carpentries = "https://carpentries.r-universe.dev/", CRAN = "https://cran.rstudio.com/"))
renv::install("carpentries/sandpaper")
renv::install("joelnitta/dovetail")
sandpaper::package_cache_trigger(TRUE)
sandpaper:::ci_deploy(reset = reset)
lesson_trans_dir <- paste0(tempdir(), "/dovetail-", Sys.Date())
lang_code <- Sys.getenv("LANG_CODE", unset = "en")
dovetail:::make_translated_dir(
translated_dir = lesson_trans_dir, overwrite = TRUE, lang = lang_code,
l10n_branch = NULL, clean = FALSE)
sandpaper:::ci_deploy(path = lesson_trans_dir, reset = reset)
shell: Rscript {0}

0 comments on commit 94322db

Please sign in to comment.