release v0.5.0 (#324) #9
Workflow file for this run
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: Website Docs Update | |
# only build on new tagged versions (OR manually specified) | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
jobs: | |
version_check: | |
name: Confirm Whole Version Number | |
runs-on: macos-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: Grep Version in DESCRIPTION | |
shell: bash | |
run: grep -E "Version:\s\d+\.\d+\.\d+$" $GITHUB_WORKSPACE/DESCRIPTION | |
build-website: | |
name: build website PR | |
needs: [version_check] | |
runs-on: macos-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-tinytex@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: pkgdown | |
- name: Build Site | |
run: pkgdown::build_site() | |
shell: Rscript {0} | |
- name: Commit website doc changes | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git add docs/\* | |
git commit -m "Update website documentation" || echo "No changes to commit" | |
git pull --ff-only | |
git push origin |