Merge pull request #3 from NOAA-EDAB/dev #165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update size and devel badges | ||
on: | ||
push: | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ env.GITHUB_REF }} | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
id: extract_branch | ||
- name: Install Pandoc | ||
run: brew install pandoc | ||
shell: bash | ||
- name: Set up R | ||
uses: r-lib/actions/setup-r@master | ||
with: | ||
r-version: '4.0.3' # problem with using 4.0.4 | ||
- name: Install command line packages | ||
run: | | ||
sudo apt update | ||
sudo apt-get install libgdal-dev libcurl4-gnutls-dev libgit2-dev libudunits2-dev | ||
shell: bash | ||
- name: Re-knit README | ||
run: | | ||
Rscript -e ' | ||
install.packages(c("knitr", "badger", "magrittr", "stringr")) | ||
knitr::knit("README.Rmd")' | ||
- name: Deploy new README to Github | ||
uses: JamesIves/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ env.branch }} # The branch the action should deploy to. | ||
folder: . # The folder the action should deploy. | ||
clean: false # Automatically remove deleted files from the deploy branch |