Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
75 changes: 75 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Deploy Docs

on:
# build for docs changes on main
push:
# TODO: reenable when ready to merge
# branches:
# - main
paths:
- docs/**

# or manual triggers from web ui
workflow_dispatch:

# 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
docs-build:
name: Docs Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install tools
uses: jdx/mise-action@v2
with:
working_directory: docs

# - uses: pnpm/action-setup@v3
# - name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version: lts
# cache: pnpm

- name: Install dependencies
working-directory: docs
run: pnpm install

- name: Build with VitePress
working-directory: docs
run: pnpm run docs:build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
docs-deploy:
name: Docs Deploy
runs-on: ubuntu-latest
needs: docs-build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
53 changes: 51 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# beavercds-ng
new implementation of beavercds/rcds
# beavercds-backend

A modern, cloud-native framework for managing CTF challenge deployment.

## What is this?


## Getting Started

Install like any other Rust binary:
```
cargo install --git https://github.com/osusec/beavercds-backend
```

See the documentation and guides for [challenge authors](https://beavercds.info) and [infrastructure admins](https://beavercds.info).

## Contributing

Contributions are welcome! Check out some of the TODO work on the issue tracker
for inspiration.

We use the standard `cargo build` process for building `beavercds` itself, and
there is a test repository under `tests/repo/` to use during development.

Dependencies:
- `rust` @ latest (currently 1.88)
- `cargo`

```bash
# build and run `beavercds check-access` with the config in the test repo
$ (cd tests/repo/ && cargo run -- check-access --profile test)
```

## Documentation

Our documentation is available at [https://beavercds.info] built from source
under `docs/`.

Dependencies (can be installed via `mise`):
- `node` @ lts
- `pnpm` (should be handled by node's corepack)

```bash
cd docs/

mise install # for node/pnpm
pnpm install # install vitepress

pnpm docs:build # build only
pnpm docs:dev # build and serve
```
136 changes: 136 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
73 changes: 73 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { defineConfig } from "vitepress";
import { generateSidebar } from "vitepress-sidebar";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "beaverCDS Docs",
description: "Next-generation CTF deployment framework",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Setup", link: "guides/infra-quickstart" },
{
text: "Guides",
items: [
{ text: "Deployment Quickstart", link: "for-sysadmins/quickstart" },
{ text: "Add new challenge", link: "for-authors/quickstart" },
],
},

{
text: "Infrastructure Setup",
items: [
{ text: "Quickstart", link: "/for-sysadmins/quickstart" },
{ text: "Install", link: "/for-sysadmins/install" },
{ text: "Config Reference", link: "/for-sysadmins/config" },
{ text: "Architecture", link: "/for-sysadmins/architecture" },
],
},
{
text: "Challenge Authors",
items: [
{ text: "Challenge Quickstart", link: "/for-authors/quickstart" },
{
text: "Challenge Config Reference",
link: "/for-authors/challenge-config",
},
],
},
],

// auto generate sidebar from directory structure, via vitepress-sidebar
sidebar: generateSidebar({
documentRootPath: "./",
// pull title from markdown not filename
useTitleFromFileHeading: true,
useTitleFromFrontmatter: true,
keepMarkdownSyntaxFromTitle: true,
useFolderTitleFromIndexFile: true,
// transform name to sentence case
hyphenToSpace: true,
underscoreToSpace: true,
// capitalizeEachWords: true,

sortFolderTo: "bottom",
sortMenusByFrontmatterOrder: true,
}),

socialLinks: [
{ icon: "github", link: "https://github.com/osusec/beavercds-ng" },
],
},

// disable interpolation of {{ and }} in markdown
markdown: {
config(md) {
const defaultCodeInline = md.renderer.rules.code_inline!;
md.renderer.rules.code_inline = (tokens, idx, options, env, self) => {
tokens[idx].attrSet("v-pre", "");
return defaultCodeInline(tokens, idx, options, env, self);
};
},
},
});
Loading