Skip to content

Commit bd9b934

Browse files
committed
Docs deployment CI
Signed-off-by: Robert Detjens <github@detjens.dev>
1 parent e18d4a7 commit bd9b934

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/docs-deploy.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Deploy Docs
2+
3+
on:
4+
# build for docs changes on main
5+
push:
6+
# TODO: reenable when ready to merge
7+
# branches:
8+
# - main
9+
paths:
10+
- docs/**
11+
12+
# or manual triggers from web ui
13+
workflow_dispatch:
14+
15+
# allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: pages
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
docs-build:
30+
name: Docs Build
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install tools
37+
uses: jdx/mise-action@v2
38+
with:
39+
working_directory: docs
40+
41+
# - uses: pnpm/action-setup@v3
42+
# - name: Setup Node
43+
# uses: actions/setup-node@v4
44+
# with:
45+
# node-version: lts
46+
# cache: pnpm
47+
48+
- name: Install dependencies
49+
working-directory: docs
50+
run: pnpm install
51+
52+
- name: Build with VitePress
53+
working-directory: docs
54+
run: pnpm run docs:build
55+
56+
- name: Upload artifact
57+
uses: actions/upload-pages-artifact@v3
58+
with:
59+
path: docs/.vitepress/dist
60+
61+
# Deployment job
62+
docs-deploy:
63+
name: Docs Deploy
64+
runs-on: ubuntu-latest
65+
needs: docs-build
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
69+
steps:
70+
- name: Setup Pages
71+
uses: actions/configure-pages@v4
72+
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

docs/mise.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[tools]
22
node = "lts"
3+
"npm:corepack" = "latest"

0 commit comments

Comments
 (0)