This commit is contained in:
MacRimi 2025-02-14 10:25:31 +01:00
parent 990b2bf7de
commit 68cbedcfd7
10 changed files with 91 additions and 196 deletions

63
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,63 @@
name: Deploy to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: |
cd web
npm ci
- name: Build with Next.js
run: |
cd web
npm run build
- name: Static HTML export with Next.js
run: |
cd web
npm run export
- name: Copy guides and changelog
run: |
mkdir -p web/out/guides
cp guides/*.md web/out/guides/
cp CHANGELOG.md web/out/
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: web/out
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

View File

@ -1,90 +0,0 @@
name: Deploy Next.js site to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: |
cd web
npm install --force
npm install react-day-picker
- name: Ensure required dependencies are installed
run: |
cd web
npm list next-themes || npm install next-themes
npm list @radix-ui/react-accordion || npm install @radix-ui/react-accordion
npm list @radix-ui/react-alert-dialog || npm install @radix-ui/react-alert-dialog
npm list @radix-ui/react-aspect-ratio || npm install @radix-ui/react-aspect-ratio
npm list @radix-ui/react-avatar || npm install @radix-ui/react-avatar
npm list @radix-ui/react-dialog || npm install @radix-ui/react-dialog
npm list @radix-ui/react-tooltip || npm install @radix-ui/react-tooltip
npm list @radix-ui/react-switch || npm install @radix-ui/react-switch
npm list @radix-ui/react-popover || npm install @radix-ui/react-popover
npm list @radix-ui/react-toast || npm install @radix-ui/react-toast
- name: Verify dependencies installation
run: |
cd web
missing=0
for dep in next-themes @radix-ui/react-accordion @radix-ui/react-alert-dialog @radix-ui/react-aspect-ratio @radix-ui/react-avatar @radix-ui/react-dialog @radix-ui/react-tooltip @radix-ui/react-switch @radix-ui/react-popover @radix-ui/react-toast; do
if [ ! -d "node_modules/$dep" ]; then
echo "❌ ERROR: Missing dependency: $dep"
missing=1
fi
done
if [ "$missing" -eq 1 ]; then
exit 1
else
echo "✅ All required dependencies are installed!"
fi
- name: Build Next.js project
run: |
cd web
npm run build
- name: Copy guides and changelog
run: |
mkdir -p web/out/guides
cp -r guides/*.md web/out/guides/ || echo "No guides found"
cp CHANGELOG.md web/out/ || echo "No CHANGELOG.md found"
- name: Upload artifact to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: web/out
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@v4

View File

@ -1,34 +0,0 @@
# Changelog
All notable changes to ProxMenux will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Initial project setup
- Basic menu structure
- Documentation framework
## [0.1.0] - 2023-06-15
### Added
- Core functionality for executing shell scripts
- Menu-driven interface for script selection
- Basic error handling and logging
### Changed
- Improved script organization with categories
### Fixed
- Issue with script permissions on certain systems
## [0.0.1] - 2023-06-01
### Added
- Project initialization
- README with basic project description
- License file

View File

@ -1,26 +0,0 @@
# ProxMenux
ProxMenux is a menu-driven script for Proxmox VE management. This repository contains both the core ProxMenux tool and its documentation website.
## Project Structure
- `/web`: Contains the Next.js website for ProxMenux documentation
- `/guides`: Markdown files for various guides
- `CHANGELOG.md`: Project changelog
## Getting Started
To run the documentation website locally:
1. Navigate to the `/web` directory
2. Install dependencies: `npm install`
3. Run the development server: `npm run dev`
## Deployment
This project is set up for automatic deployment to GitHub Pages using GitHub Actions. Any push to the `main` branch will trigger a new build and deployment.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.

View File

@ -1,12 +0,0 @@
# Ejemplo de Guía Adicional
Este es el contenido de la guía de ejemplo. Aquí puedes escribir el contenido de tu guía utilizando Markdown.
## Sección 1
Contenido de la sección 1...
## Sección 2
Contenido de la sección 2...

View File

@ -1,27 +0,0 @@
# Setting up NVIDIA Drivers on Proxmox VE with GPU Passthrough
This guide explains how to install and configure NVIDIA drivers on your Proxmox VE host and enable GPU passthrough to your virtual machines. This allows you to leverage the power of your NVIDIA GPU within your VMs for tasks like machine learning, gaming, or video editing.
## Prerequisites
Before you begin, ensure you have the following:
* A Proxmox VE server with an NVIDIA GPU installed.
* Access to the Proxmox VE command line interface (CLI) via SSH.
* A basic understanding of Proxmox VE and virtual machine management.
## Installing the NVIDIA Driver on the Proxmox VE Host
This step involves installing the NVIDIA driver on your Proxmox VE host operating system. The exact steps may vary slightly depending on your Proxmox VE version and the specific NVIDIA GPU you are using. Consult the official NVIDIA documentation for the most up-to-date instructions.
Generally, you will need to download the appropriate driver package from the NVIDIA website and then install it using the package manager for your distribution.
## Enabling GPU Passthrough
Once the NVIDIA driver is installed, you need to enable GPU passthrough for your virtual machines. This involves assigning the GPU to a specific VM.
1. **Identify your GPU:** Use the `lspci` command to identify the PCI address of your NVIDIA GPU. The output will look something like this:
```bash
01:00.0 VGA compatible controller: NVIDIA Corporation ...

View File

@ -2,6 +2,7 @@ import fs from "fs"
import path from "path" import path from "path"
import { remark } from "remark" import { remark } from "remark"
import html from "remark-html" import html from "remark-html"
import DocsLayout from "../components/docs-layout"
async function getChangelog() { async function getChangelog() {
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md") const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
@ -15,10 +16,12 @@ export default async function ChangelogPage() {
const changelogContent = await getChangelog() const changelogContent = await getChangelog()
return ( return (
<DocsLayout>
<div className="container mx-auto px-4 py-16 max-w-4xl"> <div className="container mx-auto px-4 py-16 max-w-4xl">
<h1 className="text-4xl font-bold mb-8">Changelog</h1> <h1 className="text-4xl font-bold mb-8">Changelog</h1>
<div className="prose prose-lg dark:prose-invert" dangerouslySetInnerHTML={{ __html: changelogContent }} /> <div className="prose prose-lg" dangerouslySetInnerHTML={{ __html: changelogContent }} />
</div> </div>
</DocsLayout>
) )
} }

View File

@ -0,0 +1,8 @@
"use client"
import type React from "react"
export default function DocsLayout({ children }: { children: React.ReactNode }) {
return <div className="min-h-screen bg-white text-gray-900">{children}</div>
}

View File

@ -2,6 +2,7 @@ import fs from "fs"
import path from "path" import path from "path"
import { remark } from "remark" import { remark } from "remark"
import html from "remark-html" import html from "remark-html"
import DocsLayout from "../../components/docs-layout"
async function getGuideContent(slug: string) { async function getGuideContent(slug: string) {
const guidePath = path.join(process.cwd(), "..", "guides", `${slug}.md`) const guidePath = path.join(process.cwd(), "..", "guides", `${slug}.md`)
@ -22,9 +23,11 @@ export default async function GuidePage({ params }: { params: { slug: string } }
const guideContent = await getGuideContent(params.slug) const guideContent = await getGuideContent(params.slug)
return ( return (
<DocsLayout>
<div className="container mx-auto px-4 py-16 max-w-3xl"> <div className="container mx-auto px-4 py-16 max-w-3xl">
<div className="prose prose-lg dark:prose-invert" dangerouslySetInnerHTML={{ __html: guideContent }} /> <div className="prose prose-lg" dangerouslySetInnerHTML={{ __html: guideContent }} />
</div> </div>
</DocsLayout>
) )
} }

View File

@ -1,3 +1,5 @@
const path = require("path")
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
output: "export", output: "export",
@ -6,6 +8,11 @@ const nextConfig = {
}, },
assetPrefix: "/ProxMenux/", assetPrefix: "/ProxMenux/",
basePath: "/ProxMenux", basePath: "/ProxMenux",
webpack: (config, { isServer }) => {
config.resolve.alias["@guides"] = path.join(__dirname, "..", "guides")
config.resolve.alias["@changelog"] = path.join(__dirname, "..", "CHANGELOG.md")
return config
},
} }
module.exports = nextConfig module.exports = nextConfig