Skip to content

Commit 41f655f

Browse files
committed
preview docs on pr
1 parent b9aefe3 commit 41f655f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/preview-docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: preview docs
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- closed
10+
workflow_dispatch:
11+
12+
concurrency: preview-${{ github.ref }}
13+
14+
jobs:
15+
deploy-preview:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: 3.x
24+
25+
- name: Install and Build
26+
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed
27+
run: |
28+
python -m pip install -e ".[docs]"
29+
mkdocs build
30+
31+
- name: Deploy preview
32+
uses: rossjrw/pr-preview-action@v1
33+
with:
34+
source-dir: ./site/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ vetiver-testing/rsconnect_api_keys.json
3434

3535
# license files should not be commited to this repository
3636
*.lic
37+
/site/

0 commit comments

Comments
 (0)