Skip to content

Commit 46bec1b

Browse files
committed
Add GHA to publish documentation
1 parent cfa7c63 commit 46bec1b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,34 @@ jobs:
3939
git add --force NAMESPACE man
4040
git commit -m 'Create a development build'
4141
git push --force origin build
42+
43+
docs:
44+
name: Publish documentation
45+
runs-on: ubuntu-latest
46+
needs: build
47+
48+
steps:
49+
- uses: actions/checkout@v3
50+
51+
- uses: r-lib/actions/setup-r@v2
52+
53+
- uses: r-lib/actions/setup-r-dependencies@v2
54+
with:
55+
dependencies: NA
56+
extra-packages: any::pkgdown
57+
58+
- name: Build documentation
59+
run: |
60+
git checkout build
61+
make site
62+
63+
- name: Publish documentation
64+
run: |
65+
git config user.name klmr
66+
git config user.email klmr@users.noreply.github.com
67+
git remote set-url --push origin https://klmr:$GITHUB_TOKEN@github.com/klmr/box.git
68+
git branch -D site 2>/dev/null || :
69+
git checkout -b site
70+
git add --force docs
71+
git commit -m 'Build documentation'
72+
git push --force origin site

0 commit comments

Comments
 (0)