Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs build to create multi-version builds. #37

Merged
merged 5 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr-apache-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- '18'
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,25 @@ jobs:
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache version builds
uses: actions/cache@v4
with:
key: lando-mvb-docs
path: docs/.vitepress/cache/@lando/mvb
save-always: true
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
- name: Install NPM dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Run tests
- name: Run linter
run: npm run lint
- name: Test mvb
run: npm run docs:mvb
- name: Test build
run: npm run docs:build
4 changes: 2 additions & 2 deletions .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
Expand Down
3 changes: 3 additions & 0 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export default defineConfig({
['link', {rel: 'icon', href: '/apache/favicon.svg', type: 'image/svg+xml'}],
],
themeConfig: {
multiVersionBuild: {
satisfies: '>=1.0.0',
},
sidebar: sidebar(),
},
});
Expand Down
40 changes: 40 additions & 0 deletions docs/v/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
description: All Other documentation versions
title: Docuverse
contributors: false
lastUpdated: false
editLink: false
next: false
prev: false
---
# Docuverse

<br />
<br />

<div
v-for="link in links"
:key="link.text"
class="version-link"
>
<VPLVersionLink
:text="link.text"
:href="link.href"
:prerelease="link.prerelease"
:stable="link.stable"
:edge="link.edge"
/>
</div>

<br />

<div>
<VPLVersionLink :dev="true" :text="aliases.dev" :href="aliasLinks.dev" />
</div>

<script setup>
import {useTags} from '@lando/vitepress-theme-default-plus';
import {VPLCollectionPage, VPLCollectionPageSection, VPLCollectionPageTitle, VPLVersionLink} from '@lando/vitepress-theme-default-plus';

const {aliases, aliasLinks, links} = useTags();
</script>
23 changes: 15 additions & 8 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
[build]
base = "./"
publish = "docs/.vitepress/dist"
command = "npm run docs:mvb"

[context.deploy-preview]
command = "npm run docs:build"

# https://github.com/munter/netlify-plugin-checklinks#readme
[[context.deploy-preview.plugins]]
package = "netlify-plugin-checklinks"
[context.deploy-preview.plugins.inputs]
todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com", "/v/" ]
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true



# Sets our asset optimization
[build.processing.css]
bundle = true
Expand All @@ -28,13 +41,7 @@
[plugins.inputs.audits]
output_path = "reports/lighthouse.html"

# https://github.com/munter/netlify-plugin-checklinks#readme
[[plugins]]
package = "netlify-plugin-checklinks"
[plugins.inputs]
todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com" ]
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true


# We need this so preview environments and the base site look ok on their own
[[redirects]]
Expand All @@ -44,4 +51,4 @@
[[redirects]]
from = "/plugins/apache/*"
to = "/:splat"
status = 200
status = 200
Loading
Loading