Skip to content

Commit a1da02a

Browse files
committed
docs: make v2 the default docs, move v1 to /v1/ subpath
1 parent e3ee726 commit a1da02a

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎.github/workflows/pages.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy VitePress site to Pages
22

33
on:
44
push:
5-
branches: [main, v2]
5+
branches: [main, v1]
66

77
workflow_dispatch:
88

@@ -26,11 +26,11 @@ jobs:
2626
path: main
2727
fetch-depth: 0
2828

29-
- name: Checkout v2
29+
- name: Checkout v1
3030
uses: actions/checkout@v7
3131
with:
32-
ref: v2
33-
path: v2
32+
ref: v1
33+
path: v1
3434
fetch-depth: 0
3535

3636
- name: Setup Node
@@ -43,14 +43,14 @@ jobs:
4343
- name: Setup Pages
4444
uses: actions/configure-pages@v6
4545

46-
- name: Build main docs (v1.x — stable)
46+
- name: Build main docs (v2.0 — current)
4747
working-directory: main
4848
run: |
4949
npm ci
5050
npm run docs:build
5151
52-
- name: Build v2 docs (v2.0 — next)
53-
working-directory: v2
52+
- name: Build v1 docs (v1.x — stable)
53+
working-directory: v1
5454
run: |
5555
npm ci
5656
npm run docs:build
@@ -59,16 +59,16 @@ jobs:
5959
run: |
6060
mkdir -p site
6161
cp -r main/docs/.vitepress/dist/. site/
62-
mkdir -p site/v2
63-
cp -r v2/docs/.vitepress/dist/. site/v2/
62+
mkdir -p site/v1
63+
cp -r v1/docs/.vitepress/dist/. site/v1/
6464
6565
- name: Upload artifact
6666
uses: actions/upload-pages-artifact@v5
6767
with:
6868
path: site
6969

7070
deploy:
71-
# Every branch pushed above (main, v2) must also be listed in Settings >
71+
# Every branch pushed above (main, v1) must also be listed in Settings >
7272
# Environments > github-pages > Deployment branches, or this job 403s.
7373
environment:
7474
name: github-pages

‎docs/.vitepress/config.mjs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ const blueprintCodeTheme = {
2020
export default defineConfig({
2121
title: 'Simple Data Objects',
2222
description: 'Lightweight, attribute-driven Data Transfer Objects for PHP 8.4+',
23-
base: '/simple-data-objects/v2/',
23+
base: '/simple-data-objects/',
2424

2525
head: [
26-
['link', { rel: 'icon', href: '/simple-data-objects/v2/favicon.ico' }],
26+
['link', { rel: 'icon', href: '/simple-data-objects/favicon.ico' }],
2727
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
2828
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
2929
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap' }],
@@ -40,10 +40,10 @@ export default defineConfig({
4040
{ text: 'Laravel', link: '/laravel/' },
4141
{ text: 'Casts', link: '/casts/' },
4242
{
43-
text: 'v2.0 (next)',
43+
text: 'v2.0 (current)',
4444
items: [
45-
{ text: 'v2.0 (next) — current', link: '/' },
46-
{ text: 'v1.x (stable)', link: 'https://std-out.github.io/simple-data-objects/' },
45+
{ text: 'v2.0 (current)', link: '/' },
46+
{ text: 'v1.x (stable)', link: 'https://std-out.github.io/simple-data-objects/v1/' },
4747
],
4848
},
4949
{

0 commit comments

Comments
 (0)