Skip to content

A bit of cleanup (#190) #89

A bit of cleanup (#190)

A bit of cleanup (#190) #89

on:
push:
branches: main
name: pkgdown+codemeta
jobs:
pkgdown-codemeta:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- uses: r-lib/actions/setup-pandoc@v2
- name: Install databases (macOS)
run: |
bash db-setup/postgres-brew.sh
bash db-setup/mariadb-brew.sh
- name: Install dependencies
run: |
brew install libgit2
Rscript -e 'install.packages("remotes")' \
-e 'install.packages("ps")' \
-e 'remotes::install_github("ropensci/codemetar")' \
-e 'remotes::install_deps(dependencies = TRUE)' \
-e 'remotes::install_github("r-lib/pkgdown")'
- name: Install package
run: R CMD INSTALL .
- name: Git setup
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
- name: Render codemeta
run: Rscript -e 'options(codemeta_branch = "main"); codemetar::write_codemeta()'
- name: Commit results
run: |
git commit codemeta.json -m 'Re-build codemeta.json' || echo "No changes to commit"
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to commit"
git pull
- name: Deploy pkgdown site
run: |
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"