Skip to content

Commit 73ce793

Browse files
chore: document and push changes in ci on pull requests (#460)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9fd4116 commit 73ce793

File tree

7 files changed

+48
-6
lines changed

7 files changed

+48
-6
lines changed

.github/workflows/document.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Document
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
document:
10+
runs-on: ubuntu-latest
11+
env:
12+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: r-lib/actions/pr-fetch@v2
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- uses: r-lib/actions/setup-r@v2
22+
with:
23+
use-public-rspm: true
24+
25+
- uses: r-lib/actions/setup-r-dependencies@v2
26+
with:
27+
extra-packages: any::roxygen2
28+
needs: pr-document
29+
30+
- name: Document
31+
run: roxygen2::roxygenise()
32+
shell: Rscript {0}
33+
34+
- name: Commit changes
35+
run: |
36+
git config --local user.name "github-actions[bot]"
37+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
38+
git add man/\* NAMESPACE
39+
git commit -m 'Update documentation' || echo "No changes to commit"
40+
41+
- uses: r-lib/actions/pr-push@v2
42+
with:
43+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-commands.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
with:
5757
repo-token: ${{ secrets.GITHUB_TOKEN }}
5858

59-
6059
document:
6160
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
6261
name: document

man/bundle_dir.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bundle_path.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bundle_static.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/connect.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/deploy.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)