Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
fix linting, testing, removing dangling yarn threads
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Jan 29, 2024
1 parent 3039e82 commit dadb917
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 3,176 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
name: Documentation tests
name: Run Docs Tests

on:
pull_request:

jobs:
docs-tests:
unit-tests:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
node-version:
- '16'
- '18'
steps:
# Install deps and cache
# Eventually it would be great if these steps could live in a separate YAML file
# that could be included in line to avoid code duplication
- name: Checkout code
uses: actions/checkout@v3
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Run doc tests
- name: Lint docs code
run: yarn lint
- name: Build Docs
run: yarn build
# Run tests
- name: Run linter
run: npm run lint
- name: Test build
run: npm run build
22 changes: 10 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,21 @@ env.yml
lando.env
.lando.local.yml

# Build dirs
build
dist
_docs3

# coverage reporting
.nyc_output
coverage/

# Vuepress
# docs
build
dist
_docs3
.temp
.cache
dist
_site
dist
cache
temp
config.*.timestamp-*-*.*

# vitepress thangs
.vitepress/.temp
.vitepress/cache
.vitepress/dist
.vitepress/config.*.timestamp-*-*.*
# yarn
yarn.lock
12 changes: 4 additions & 8 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: lando-docs
services:
node:
type: node:14
type: node:18
build:
- yarn install
- npm install
scanner: false
ssl: false
sslExpose: false
Expand All @@ -13,10 +13,6 @@ services:
tooling:
node:
service: node
yarn:
npm:
service: node
dev:
service: node
cmd: yarn dev --port 8011
env:
DEBUG: "@lando/*"

161 changes: 77 additions & 84 deletions .vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import {createRequire} from 'module';

import {defineConfig} from '@lando/vitepress-theme-default-plus/config';

const require = createRequire(import.meta.url);

const {version} = require('../package.json');

export default defineConfig({
title: 'Lando',
description: 'Documentation.',
landoDocs: 3,
base: '/',
head: [
['meta', {name: 'viewport', content: 'width=device-width, initial-scale=1'}],
['link', {rel: 'icon', href: '/favicon.ico', size: 'any'}],
Expand Down Expand Up @@ -48,99 +41,99 @@ export default defineConfig({
text: 'Guides',
collapsed: true,
items: [
{"link": "/guides/access-by-other-devices.html", "text": "Accessing Lando from Other Devices on Your Local Network"},
{"link": "/guides/db-export.html", "text": "SQL Export"},
{"link": "/guides/db-import.html", "text": "SQL Import"},
{"link": "/guides/external-access.html", "text": "Accessing Your Services Externally"},
{"link": "/guides/how-do-i-configure-a-lando-recipe.html", "text": "How do I configure a Lando Recipe?"},
{"link": "/guides/how-do-i-set-the-timezone-of-a-lando-service.html", "text": "How do I set the timezone of a Lando service?"},
{"link": "/guides/lando-info.html", "text": "Using $LANDO_INFO"},
{"link": "/guides/lando-phpstorm.html", "text": "Lando + PhpStorm + Xdebug"},
{"link": "/guides/lando-with-vscode.html", "text": "Using Lando with VSCode"},
{"link": "/guides/offline-dev.html", "text": "Developing offline"},
{"link": "/guides/overriding-a-service-version.html", "text": "Overriding a Service Version or Image"},
{"link": "/guides/updating-to-rc2.html", "text": "Updating to 3.0.0-rc.2+"},
{"link": "/guides/lando-corporate-network-tips.html", "text": "Lando in Corporate Network Environments"},
{"link": "/guides/accessibility.html", "text": "Accessibility and Lando"}
{link: '/guides/access-by-other-devices.html', text: 'Accessing Lando from Other Devices on Your Local Network'},
{link: '/guides/db-export.html', text: 'SQL Export'},
{link: '/guides/db-import.html', text: 'SQL Import'},
{link: '/guides/external-access.html', text: 'Accessing Your Services Externally'},
{link: '/guides/how-do-i-configure-a-lando-recipe.html', text: 'How do I configure a Lando Recipe?'},
{link: '/guides/how-do-i-set-the-timezone-of-a-lando-service.html', text: 'How do I set the timezone of a Lando service?'},
{link: '/guides/lando-info.html', text: 'Using $LANDO_INFO'},
{link: '/guides/lando-phpstorm.html', text: 'Lando + PhpStorm + Xdebug'},
{link: '/guides/lando-with-vscode.html', text: 'Using Lando with VSCode'},
{link: '/guides/offline-dev.html', text: 'Developing offline'},
{link: '/guides/overriding-a-service-version.html', text: 'Overriding a Service Version or Image'},
{link: '/guides/updating-to-rc2.html', text: 'Updating to 3.0.0-rc.2+'},
{link: '/guides/lando-corporate-network-tips.html', text: 'Lando in Corporate Network Environments'},
{link: '/guides/accessibility.html', text: 'Accessibility and Lando'},
],
},
{
text: 'Troubleshooting',
collapsed: true,
items: [
{"link": "/help/logs.html", "text": "Accessing Logs"},
{"link": "/help/wkbox.html", "text": "Using Lando with Kalabox"},
{"link": "/help/updating.html", "text": "Updating"},
{"link": "/help/purging-containers.html", "text": "Purging Containers"},
{"link": "/help/dns-rebind.html", "text": "DNS Rebinding Protection"},
{"link": "/help/win-file-upload.html", "text": "Uploading Files in Windows"},
{"link": "/help/file-sync.html", "text": "File syncing issues"},
{"link": "/help/win-also-vb.html", "text": "Windows is also running VirtualBox"},
{"link": "/help/proxy", "text": "Running Lando behind a Proxy"},
{"link": "/help/switching-dbs.html", "text": "Switching Database Configuration"}
{link: '/help/logs.html', text: 'Accessing Logs'},
{link: '/help/wkbox.html', text: 'Using Lando with Kalabox'},
{link: '/help/updating.html', text: 'Updating'},
{link: '/help/purging-containers.html', text: 'Purging Containers'},
{link: '/help/dns-rebind.html', text: 'DNS Rebinding Protection'},
{link: '/help/win-file-upload.html', text: 'Uploading Files in Windows'},
{link: '/help/file-sync.html', text: 'File syncing issues'},
{link: '/help/win-also-vb.html', text: 'Windows is also running VirtualBox'},
{link: '/help/proxy', text: 'Running Lando behind a Proxy'},
{link: '/help/switching-dbs.html', text: 'Switching Database Configuration'},
],
},
{
text: 'Contributing',
collapsed: true,
items: [
{"link": "/contrib/index.html", "text": "Getting Involved"},
{"link": "/contrib/coder.html", "text": "Coding"},
{"link": "/contrib/evangelist.html", "text": "Evangelizing"},
{"link": "/contrib/sponsoring.html", "text": "Sponsoring"}
{link: '/contrib/index.html', text: 'Getting Involved'},
{link: '/contrib/coder.html', text: 'Coding'},
{link: '/contrib/evangelist.html', text: 'Evangelizing'},
{link: '/contrib/sponsoring.html', text: 'Sponsoring'},
],
},
],
},
},
});

function configSideBar() {
return [
{
text: 'Theme Configuration',
collapsed: false,
items: [
{text: 'Configuration', link: '/config/config'},
{text: 'Frontmatter', link: '/config/frontmatter'},
{text: 'useCollection()', link: '/composables/use-collection'},
{text: 'useTeam()', link: '/composables/use-team'},
],
},
{
text: 'Pages',
collapsed: false,
items: [
{text: 'Collections', link: '/pages/collections'},
{text: 'Teams', link: '/pages/teams'},
],
},
{
text: 'Global Components',
collapsed: false,
items: [
{text: 'Jobs', link: '/components/jobs'},
{text: 'MailChimp', link: '/components/mailchimp'},
{text: 'Sponsor', link: '/components/sponsors'},
{text: 'YouTube', link: '/components/youtube'},
],
},
{
text: 'Markdown Containers',
collapsed: false,
items: [
{text: 'Admonitions', link: '/markdown/admonitions'},
{text: 'Alignments', link: '/markdown/alignments'},
{text: 'Boxes', link: '/markdown/boxes'},
{text: 'Cards', link: '/markdown/cards'},
{text: 'Columns', link: '/markdown/columns'},
{text: 'Highlights', link: '/markdown/highlights'},
{text: 'Tabs', link: '/markdown/tabs'},
{text: 'Thumbnails', link: '/markdown/thumbnails'},
{text: 'Advanced', link: '/guides/advanced-markdown'},
],
},
{text: 'Blog', link: '/blog'},
{text: 'Guides', link: '/guides'},
];
}
// function configSideBar() {
// return [
// {
// text: 'Theme Configuration',
// collapsed: false,
// items: [
// {text: 'Configuration', link: '/config/config'},
// {text: 'Frontmatter', link: '/config/frontmatter'},
// {text: 'useCollection()', link: '/composables/use-collection'},
// {text: 'useTeam()', link: '/composables/use-team'},
// ],
// },
// {
// text: 'Pages',
// collapsed: false,
// items: [
// {text: 'Collections', link: '/pages/collections'},
// {text: 'Teams', link: '/pages/teams'},
// ],
// },
// {
// text: 'Global Components',
// collapsed: false,
// items: [
// {text: 'Jobs', link: '/components/jobs'},
// {text: 'MailChimp', link: '/components/mailchimp'},
// {text: 'Sponsor', link: '/components/sponsors'},
// {text: 'YouTube', link: '/components/youtube'},
// ],
// },
// {
// text: 'Markdown Containers',
// collapsed: false,
// items: [
// {text: 'Admonitions', link: '/markdown/admonitions'},
// {text: 'Alignments', link: '/markdown/alignments'},
// {text: 'Boxes', link: '/markdown/boxes'},
// {text: 'Cards', link: '/markdown/cards'},
// {text: 'Columns', link: '/markdown/columns'},
// {text: 'Highlights', link: '/markdown/highlights'},
// {text: 'Tabs', link: '/markdown/tabs'},
// {text: 'Thumbnails', link: '/markdown/thumbnails'},
// {text: 'Advanced', link: '/guides/advanced-markdown'},
// ],
// },
// {text: 'Blog', link: '/blog'},
// {text: 'Guides', link: '/guides'},
// ];
// }
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
base = "./"
publish = "dist"
command = "yarn build"
publish = "docs/.vitepress/dist"
command = "npm run build"

# Sets our asset optimization
[build.processing.css]
Expand Down
Loading

0 comments on commit dadb917

Please sign in to comment.