Skip to content

Commit b176b28

Browse files
committed
Docs deployment
1 parent fcaabfe commit b176b28

File tree

4 files changed

+59
-6
lines changed

4 files changed

+59
-6
lines changed

.github/workflows/docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy_docs:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Setup uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
enable-cache: true
30+
- name: Install dependencies
31+
run: make sync
32+
- name: Build docs
33+
run: uv run mkdocs build --site-dir site
34+
- name: Configure Pages
35+
uses: actions/configure-pages@v5
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: site
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ test:
2222
build:
2323
npm run build
2424

25+
.PHONY: sync
26+
sync:
27+
uv sync --all-extras --all-packages --group dev
28+
2529
.PHONY: build-docs
2630
build-docs:
27-
mkdocs build
31+
uv run mkdocs build
2832

2933
.PHONY: serve-docs
3034
serve-docs:
31-
mkdocs serve
35+
uv run mkdocs serve
36+
37+
.PHONY: deploy-docs
38+
deploy-docs:
39+
uv run mkdocs gh-deploy --force --verbose

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
site_name: OpenAI Guardrails TypeScript
2-
site_dir: .vercel/output/static
2+
site_url: https://openai.github.io/openai-guardrails-js/
3+
site_dir: site
34
theme:
45
name: material
56
features:

requirements.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
mkdocs==1.5.3
2-
mkdocs-material==9.5.3
3-
mkdocs-mkdocstrings==0.24.0
1+
mkdocs>=1.6.1
2+
mkdocs-material>=9.6.14
3+
mkdocstrings[python]>=0.29.1
4+
pymdown-extensions>=10.0.0
5+
mkdocs-i18n>=0.4.3

0 commit comments

Comments
 (0)