Skip to content

Commit cb014e8

Browse files
edavidajatdstein
andauthored
revise CLI documentation (#664)
Co-authored-by: Taylor Steinberg <[email protected]>
1 parent 8601629 commit cb014e8

35 files changed

+1414
-1369
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,16 @@ jobs:
120120
fetch-depth: 0
121121
env:
122122
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123-
- uses: actions/setup-python@v4
123+
- name: Install uv
124+
uses: astral-sh/setup-uv@v6
124125
with:
125-
python-version: 3.8.x
126-
- run: pip freeze
127-
- run: make docs
126+
python-version: 3.12
127+
- name: build docs
128+
run: make docs
128129
- uses: actions/upload-artifact@v4
129130
with:
130131
name: docs
131-
path: docs/site/
132+
path: site/
132133
- uses: aws-actions/configure-aws-credentials@v4
133134
id: creds
134135
with:

.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/

Makefile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,25 @@ lint: lint-3.8
9797
fmt: RUNNER = bash -c
9898
fmt: fmt-3.8
9999

100+
# Documentation targets
100101
.PHONY: docs
101-
docs:
102-
$(MAKE) -C docs VERSION=$(VERSION)
102+
docs: docs-clean docs-build
103+
104+
.PHONY: docs-clean
105+
docs-clean:
106+
rm -rf site
107+
108+
.PHONY: docs-build
109+
docs-build:
110+
uv venv
111+
uv pip install ".[docs]"
112+
uv run mkdocs build
113+
114+
.PHONY: docs-serve
115+
docs-serve:
116+
uv venv
117+
uv pip install -e ".[docs]"
118+
uv run mkdocs serve
103119

104120
.PHONY: version
105121
version:
@@ -137,14 +153,14 @@ sync-latest-to-s3:
137153
sync-latest-docs-to-s3:
138154
aws s3 sync --acl bucket-owner-full-control \
139155
--cache-control max-age=0 \
140-
docs/site/ \
156+
site/ \
141157
$(S3_PREFIX)/latest/docs/
142158

143159
.PHONY: promote-docs-in-s3
144160
promote-docs-in-s3:
145161
aws s3 sync --delete --acl bucket-owner-full-control \
146162
--cache-control max-age=300 \
147-
docs/site/ \
163+
site/ \
148164
s3://docs.rstudio.com/rsconnect-python/
149165

150166
RSC_API_KEYS=vetiver-testing/rsconnect_api_keys.json

0 commit comments

Comments
 (0)