Skip to content

Commit 4848217

Browse files
Merge pull request #4 from athulanilthomas/feat/documentation-build
feat(docs): add workflow configuration for docs
2 parents 3e9f73c + 951eec0 commit 4848217

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy Docs
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: false
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- uses: pnpm/action-setup@v3
25+
with:
26+
version: 10.11.1
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: pnpm
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v4
36+
37+
- name: Install dependencies
38+
run: pnpm install
39+
40+
- name: Build with VitePress
41+
run: pnpm turbo run build --filter=docs
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: apps/docs/content/.vitepress/dist
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
needs: build
53+
runs-on: ubuntu-latest
54+
name: Deploy
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- "packages/**"
9+
- ".github/workflows/release.yml"
710

811
concurrency: ${{ github.workflow }}-${{ github.ref }}
912

apps/docs/content/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress'
33
export default defineConfig({
44
title: "splitwise-ts",
55
description: "Documentation for Splitwise SDK",
6+
base: '/splitwise-ts/',
67
lastUpdated: true,
78
themeConfig: {
89
logo: '/splitwise-ts-logo.png',

0 commit comments

Comments
 (0)