From 6fe24bc530cc9d2c3df6d03713e1a3ce3cb16ab8 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Fri, 5 Jan 2024 00:41:21 -0800 Subject: [PATCH] Add GH action --- .Rbuildignore | 1 + .github/.gitignore | 1 + .github/workflows/deploy-cran-repo.yml | 22 ++++++++++++++++++++++ README.md | 11 +++++++++++ 4 files changed, 35 insertions(+) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/deploy-cran-repo.yml diff --git a/.Rbuildignore b/.Rbuildignore index 6529bf4..af46179 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,3 @@ ^demorwasmbinary\.Rproj$ ^\.Rproj\.user$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/deploy-cran-repo.yml b/.github/workflows/deploy-cran-repo.yml new file mode 100644 index 0000000..41912eb --- /dev/null +++ b/.github/workflows/deploy-cran-repo.yml @@ -0,0 +1,22 @@ +# Workflow derived from https://github.com/r-wasm/actions/tree/v1/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + # Only build on main or master branch + branches: [main, master] + # Or when triggered manually + workflow_dispatch: + +name: Build and deploy wasm R package repository + +jobs: + # Reads `./packages` for package references to put + # into a CRAN-like repository hosted on GitHub pages + deploy-cran-repo: + uses: r-wasm/actions/.github/workflows/deploy-cran-repo.yml@v1 + permissions: + # To download GitHub Packages within action + repository-projects: read + # For publishing to pages environment + pages: write + id-token: write diff --git a/README.md b/README.md index 042f9c0..a2b4b44 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # webr-github-action-wasm-binaries + Example GitHub Actions workflow with an R package that generates developmental webR binaries + +## Steps + +1. Deployed + +```r +usethis::use_github_action( + url = "https://raw.githubusercontent.com/r-wasm/actions/v1/examples/deploy-cran-repo.yml" +) +``` \ No newline at end of file