Skip to content

Commit

Permalink
Move Docs to Lumocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Oct 5, 2023
1 parent 1ae7708 commit 60a70f3
Show file tree
Hide file tree
Showing 56 changed files with 138 additions and 55 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy Lumocs with GitHub Pages

on:
# Runs on pushes targeting the main branch
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.37.1

- name: Run Lume
run: deno task lume
working-directory: ./docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs/_site

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ core
# Test coverage
cov_profile
*.lcov
# Lumocs generated site
_site
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

1 change: 0 additions & 1 deletion docs/Gemfile

This file was deleted.

11 changes: 11 additions & 0 deletions docs/_config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import lume from "lume/mod.ts";
import lumocs from "lumocs/mod.ts";

const site = lume({
src: "src",
location: new URL("https://pup.56k.guru"),
});

site.use(lumocs());

export default site;
18 changes: 0 additions & 18 deletions docs/_config.yml

This file was deleted.

11 changes: 11 additions & 0 deletions docs/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
"build": "deno task lume",
"serve": "deno task lume -s --port=8000"
},
"imports": {
"lume/": "https://deno.land/x/[email protected]/",
"lumocs/": "https://deno.land/x/[email protected]/"
}
}
38 changes: 38 additions & 0 deletions docs/src/_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"metas": {
"title": "=title",
"site": "Pup - The Manual",
"lang": "en",
"description": "Universal Process Manager"
},
"substitute": {
"$PUP_VERSION": "1.0.0-rc.10"
},
"top_links": [
{
"icon": "fab fa-github",
"title": "GitHub Repsitory",
"url": "https://github.com/hexagon/croner"
},
{
"icon": "fas fa-cube",
"title": "Deno.land/x",
"url": "https://deno.land/x/pup"
},
{
"icon": "fab fa-npm",
"title": "NPM Library",
"url": "https://npmjs.com/package/pup"
}
],
"nav_links": [
{
"title": "GitHub Repsitory",
"url": "https://github.com/hexagon/pup"
},
{
"title": "Deno.land/x",
"url": "https://deno.land/x/pup"
}
]
}
File renamed without changes.
1 change: 0 additions & 1 deletion docs/changelog.md → docs/src/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Changelog"
nav_order: 13
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Contributing"
nav_order: 10
has_children: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Packaging Pup"
nav_order: 2
parent: Contributing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Enabling the web interface"
parent: Examples
nav_order: 3
Expand All @@ -23,7 +22,7 @@ The web interface plugin is enabled by `pup.jsonc` and available at <http://loca

To activate the web interface plugin, set up the `plugins:`-section of your `pup.json` like this:

```jsonc
```json
{
"processes": [/* ... */],
"plugins": [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Server w/ cron task"
parent: Examples
nav_order: 2
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Cluster w/ Load balancer"
parent: Examples
nav_order: 4
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Docker (Deno)"
parent: Examples
nav_order: 5
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion docs/examples/index.md → docs/src/examples/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Examples"
nav_order: 12
has_children: true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Plugin development"
parent: Contributing
nav_order: 2
Expand Down Expand Up @@ -131,7 +130,7 @@ export class PupPlugin extends PluginImplementation {

The end user configuration for activating a plugin by `pup.json` is

```jsonc
```json
{
/* ... */
"processes": [/* ... */],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Server w/ Splunk Logging"
parent: Examples
nav_order: 6
Expand All @@ -14,6 +13,7 @@ Splunk using the splunk-hec plugin.

> **Note:** If you're connecting to a Splunk HEC server with a bad certificate, such as during testing, you'll need to start pup manually with the `--unsafely-ignore-certificate-errors` flag. The full
> command for this would be `deno run -Ar --unsafely-ignore-certificate-errors https://deno.land/x/pup/pup.ts run`
{ .note }

## Files

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Telemetry"
parent: Usage
nav_order: 6
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "File watcher"
parent: Examples
nav_order: 7
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Kept-alive Worker Server"
parent: Examples
nav_order: 8
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/faq.md → docs/src/faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "FAQ"
nav_order: 8
---
Expand All @@ -16,6 +15,7 @@ A: Yes, Pup is a language-agnostic process manager. You can use it to manage pro
`ProcessConfiguration` object.

> **Note** As a library, Pup is only available for Deno.
{ .note }

**Q: How do I handle environment variables?**

Expand Down
6 changes: 1 addition & 5 deletions docs/index.md → docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Overview"
nav_order: 1
---
Expand All @@ -20,6 +19,7 @@ Pup is a powerful process manager for Deno, designed to simplify the management
telemetry feature also enables inter-process communication, allowing connected processes to interact with one another.

> **Note** Programmatic usage, process telemetry, and IPC are currently available only when running Deno client processes.
{ .note }

Pup is centered on a single configuration file, ideally named `pup.json` or `pup.jsonc`, which manages all aspects of the processes to be executed, including their execution methods and logging
handling.
Expand Down Expand Up @@ -55,7 +55,3 @@ channels [here](https://hexagon.github.io/pup/installation.html#release-channels
4. (Optional) To make your ecosystem function as a system service, install it using `pup install`. This works with systemd, sysvinit, upstart, launchd, and Windows service manager:

`pup install --name my-service`

## Table of Contents

{:toc}
1 change: 0 additions & 1 deletion docs/installation.md → docs/src/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Installation"
nav_order: 2
---
Expand Down
File renamed without changes
File renamed without changes
1 change: 0 additions & 1 deletion docs/troubleshooting.md → docs/src/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Troubleshooting"
nav_order: 9
---
Expand Down
13 changes: 7 additions & 6 deletions docs/usage/configuration.md → docs/src/usage/configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Configuration"
parent: Usage
nav_order: 2
Expand Down Expand Up @@ -33,6 +32,7 @@ the existing process definition.

> **Note**: If you quickly want to scaffold a new configuration file, you can use the cli helpers `pup init`, `append`, and `remove`. More on this at
> [Configuring using the cli](usage.html#configuring-using-the-cli).
{ .note }

## Process configuration

Expand Down Expand Up @@ -104,7 +104,7 @@ configuration file:

Most options can be used in both the global scope logger, and for each process like:

```jsonc
```json
{
"logger": {
"console": true,
Expand Down Expand Up @@ -143,7 +143,7 @@ To change default behavior of the global watcher, use the following properties w
- `match` (array of strings): The patterns to match for watched files. Default is `["**/_._"]`.
- `skip` (array of strings): The patterns to exclude from watching. Default is `["**/.git/**"]`.

```jsonc
```json
{
/* This entire section is optional, the defaults are shown below */
"watcher": {
Expand All @@ -167,10 +167,11 @@ To change default behavior of the global watcher, use the following properties w

> **Note**: If you are interested in developing a custom plugin, there is a [guide](/pup/examples/plugins/README.html) and
> [example](https://github.com/Hexagon/pup/blob/main/docs/examples/plugins/log-interceptor.ts) available.
{ .note }

To activate plugins, add your plugins to the configuration using this pattern:

```jsonc
```json
{
/* ... */
"processes": [/* ... */],
Expand Down Expand Up @@ -206,7 +207,7 @@ If you want Intellisense and code completion for `pup.json`/`pup.jsonc` in VS Co

1. Add `$schema` to your `pup.json` like this

```jsonc
```json
{
"$schema": "https://deno.land/x/pup/docs/pup.schema.json",
"processes: [
Expand All @@ -219,7 +220,7 @@ If you want Intellisense and code completion for `pup.json`/`pup.jsonc` in VS Co

It should look something like this:

```jsonc
```json
{
"json.schemas": [
{
Expand Down
3 changes: 2 additions & 1 deletion docs/usage/index.md → docs/src/usage/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: page
title: "Usage"
nav_order: 3
has_children: true
Expand Down Expand Up @@ -45,6 +44,7 @@ Pup enables you to inspect its internally stored logs through the `logs` command
- `--end <iso860-timestamp>`: (optional) Lets you display logs generated before a particular timestamp. The timestamp should be in the ISO8601 format.

> **Note**: The internal logger keeps logs for a default period of 24 hours. You can modify this setting via the global logger configuration.
{ .note }

To use the `logs` command, execute the following commands:

Expand Down Expand Up @@ -137,6 +137,7 @@ pup append --id anotherprocess --cmd "python script.py" --cwd /path/to/another/p
```

> **Warning** When using `append` to modify an existing configuration file, any comments will be stripped.
{ .note }

### Single command usage

Expand Down
Loading

0 comments on commit 60a70f3

Please sign in to comment.