Skip to content

Commit 76bf243

Browse files
committed
ci: merge style and doc, doc depends on style
1 parent 5b97c88 commit 76bf243

File tree

2 files changed

+35
-42
lines changed

2 files changed

+35
-42
lines changed

.github/workflows/document.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/style.yaml renamed to .github/workflows/style_and_doc.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,38 @@ jobs:
7171
else
7272
echo "No changes to commit."
7373
fi
74+
75+
document:
76+
needs: style
77+
runs-on: ubuntu-latest
78+
env:
79+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
80+
steps:
81+
- name: Checkout repo
82+
uses: actions/checkout@v3
83+
with:
84+
fetch-depth: 0
85+
86+
- name: Setup R
87+
uses: r-lib/actions/setup-r@v2
88+
with:
89+
use-public-rspm: true
90+
91+
- name: Install dependencies
92+
uses: r-lib/actions/setup-r-dependencies@v2
93+
with:
94+
extra-packages: any::roxygen2
95+
needs: roxygen2
96+
97+
- name: Document
98+
run: roxygen2::roxygenise()
99+
shell: Rscript {0}
100+
101+
- name: Commit and push changes
102+
run: |
103+
git config --local user.name "$GITHUB_ACTOR"
104+
git config --local user.email "[email protected]"
105+
git add man/\* NAMESPACE DESCRIPTION
106+
git commit -m "docs: update documentation (GHA)" || echo "No changes to commit"
107+
git pull --ff-only
108+
git push origin

0 commit comments

Comments
 (0)