Skip to content

Commit

Permalink
ci: 👷 fix build issues (#177)
Browse files Browse the repository at this point in the history
## Description

These changes are to fix the CI build that is failing to not find the
branch to be able to push from. Plus fixed the commit messages to be
conventional commit
  • Loading branch information
lwjohnst86 authored Dec 20, 2024
2 parents 3f8183a + 52ba970 commit dcc1ad2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/reusable-document.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Setup R
uses: r-lib/actions/setup-r@v2
Expand All @@ -39,6 +40,5 @@ jobs:
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add man/\* NAMESPACE DESCRIPTION
git commit -m "Update documentation" || echo "No changes to commit"
git pull --ff-only
git push origin
git commit -m "chore: :bento: Re-generated roxygen2 documentation" || echo "No changes to commit"
git push
14 changes: 6 additions & 8 deletions .github/workflows/reusable-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::styler, any::roxygen2
needs: styler
- name: Install styler and roxygen2
run: install.packages(c("styler", "roxygen2"))
shell: Rscript {0}

- name: Enable styler cache
run: styler::cache_activate()
Expand Down Expand Up @@ -67,9 +66,8 @@ jobs:
then
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${FILES_TO_COMMIT[*]} -m "Style code (GHA)"
git pull --ff-only
git push origin
git commit ${FILES_TO_COMMIT[*]} -m "style: :art: Auto-format code with styler"
git push
else
echo "No changes to commit."
fi

0 comments on commit dcc1ad2

Please sign in to comment.