diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..9aa0921 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,48 @@ +on: + push: + branches: + - main + - master + +name: pkgdown + +jobs: + pkgdown: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v2 + + - uses: r-lib/actions/setup-pandoc@v1 + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + shell: Rscript {0} + + - name: Restore R package cache + uses: actions/cache@v2 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + + - name: Install dependencies + run: | + remotes::install_deps(dependencies = TRUE) + install.packages("pkgdown", type = "binary") + shell: Rscript {0} + + - name: Install package + run: R CMD INSTALL . + + - name: Deploy package + run: | + git config --local user.email "actions@github.com" + git config --local user.name "GitHub Actions" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' \ No newline at end of file diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..144a1c1 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,25 @@ +url: https://bleutner.github.io/RStoolbox/ + +template: + bootstrap: 5 + +development: + mode: release + +home: + links: + - text: Find out more about our work + href: http://remote-sensing.org + +navbar: + #type: inverse + left: + - text: "News" + href: news/index.html + - text: "Functions" + href: reference/index.html + + right: + - icon: fa-github fa-lg fab + href: http://www.github.com/bleutner + \ No newline at end of file diff --git a/prep-release/makeRelease.sh b/prep-release/makeRelease.sh index d1eae84..7c97feb 100755 --- a/prep-release/makeRelease.sh +++ b/prep-release/makeRelease.sh @@ -52,14 +52,14 @@ else echo "Example data already up-to-date." fi -## Website -echo -e "\n**********************************************************" -echo "Build website documentation ******************************" -echo "**********************************************************" -git checkout gh-pages -Rscript rstbx-docu/build_docu.R -git commit -a -m "Automatic commit: Update gh-pages package documentation" -git checkout master +# ## Website () +# echo -e "\n**********************************************************" +# echo "Build website documentation ******************************" +# echo "**********************************************************" +# git checkout gh-pages +# Rscript rstbx-docu/build_docu.R +# git commit -a -m "Automatic commit: Update gh-pages package documentation" +# git checkout master echo -e "\n**********************************************************" echo "R CMD check **********************************************"