From b3958801805746990a40cb4939a43429136ac49a Mon Sep 17 00:00:00 2001 From: lfagliano Date: Fri, 1 Dec 2023 17:28:10 +0400 Subject: [PATCH] testing new workflows --- .github/workflows/pkgdown.yaml | 5 +++++ vignettes/get_started.Rmd | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index b176780..691121e 100755 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -31,6 +31,11 @@ jobs: extra-packages: any::pkgdown, local::. needs: website + - name: load enviornment variables + run: | + echo "EMAIL_ADDRESS_EXAMPLES=${{ secrets.EMAIL_ADDRESS_EXAMPLES}}" >> .Renviron + echo "EXAMPLES_KEY=${{ secrets.EXAMPLES_KEY}}" >> .Renviron + - name: Build site run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} diff --git a/vignettes/get_started.Rmd b/vignettes/get_started.Rmd index 8747a49..c20d5fb 100644 --- a/vignettes/get_started.Rmd +++ b/vignettes/get_started.Rmd @@ -50,10 +50,16 @@ To be able to access the API, you require an API key. If you are not registered Once you are registered, we encourage you to authenticate your credentials by using the `acled_access()` function. This function allows you to test that your credentials are working as intended and save your credentials in your R environment, thus allowing you to avoid the need to manually input your credentials during each data request. -```{r} +```{r, eval=FALSE} acled_access(email = "acledexamples@gmail.com", key = "M3PWwg3DIdhHMuDiilp5") # This is an example, you will need to input your credentials. ``` +```{r} +acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = ys.getenv("EXAMPLES_KEY")) +``` + + + If the authentication was successful, you will find a message in the console stating "Authorization accepted". ## Requesting data from ACLED’s API - `acled_api()`