Skip to content

Render and Deploy KWB-R Package Status Table #931

Render and Deploy KWB-R Package Status Table

Render and Deploy KWB-R Package Status Table #931

Workflow file for this run

name: Render and Deploy KWB-R Package Status Table
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
schedule:
# * is a special character in YAML so you have to quote this string
# Run this job every day at 05:00 a.m UTC ('0 5 * * *')
- cron: '0 5 * * *'
jobs:
render:
runs-on: macOS-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: TRUE
APPVEYOR_TOKEN: ${{ secrets.APPVEYOR_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install system dependencies
if: runner.os == 'MacOS'
run: brew install harfbuzz fribidi
- 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: Install dependencies
run: |
Rscript -e "remotes::install_deps(dependencies = TRUE)"
# - name: Cache R packages
# 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: Render R-Package Status Table
run: |
Rscript -e "kwb.pkgstatus::create_report_rpackages()"
- name: Deploy To GH-Pages
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git clone -b gh-pages https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git website
cd website
git rm -rf *
cp -r ../index.html ./
git add --all *
git commit -m 'Update status table'
git push -q origin gh-pages