small updates #3
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
on: | |
push: | |
branches: [main, master] | |
name: Package style | |
jobs: | |
style: | |
name: style | |
runs-on: ubuntu-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@v2 | |
- name: Install styler | |
run: Rscript -e 'install.packages("styler")' | |
- name: Style | |
run: Rscript -e 'styler::style_pkg()' | |
- name: commit | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
git add . | |
git commit -m 'formatted package' || echo "No changes to commit" | |
git push origin || echo "No changes to commit" | |