Add mkdocs setup
This commit was merged in pull request #1.
This commit is contained in:
33
.gitea/workflows/deploy.yml
Normal file
33
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: Build and deploy documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build-and-deploy-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure git credentials
|
||||
run: |
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3"
|
||||
- name: Install mkdocs-material
|
||||
run: pip install mkdocs-material=="9.*"
|
||||
- name: Build documentation
|
||||
run: mkdocs build
|
||||
- name: Deploy documentation
|
||||
# the default mkdocs build output directory `/site` is gitignored
|
||||
# so it's safe to `git rm -rf .`
|
||||
run: |
|
||||
git checkout --orphan gitea-pages
|
||||
git rm -rf .
|
||||
cp -r site/* .
|
||||
git add .
|
||||
git commit -m "Deploy documentation"
|
||||
git push --force origin gitea-pages
|
||||
11
.gitea/workflows/md.yml
Normal file
11
.gitea/workflows/md.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Lint markdown files
|
||||
on: [pull_request] # yamllint disable-line rule:truthy
|
||||
jobs:
|
||||
run-markdownlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://github.com/DavidAnson/markdownlint-cli2-action@v20
|
||||
with:
|
||||
globs: "**/*.md"
|
||||
12
compose.yml
Normal file
12
compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
services:
|
||||
mkdocs:
|
||||
image: docker.io/squidfunk/mkdocs-material:9
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
volumes:
|
||||
- ./:/docs
|
||||
ports:
|
||||
- 8000:8000
|
||||
healthcheck:
|
||||
test: wget --spider --quiet http://127.0.0.1:8000
|
||||
14
docs/index.md
Normal file
14
docs/index.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Hello World! 👋
|
||||
|
||||
*Knock knock.*
|
||||
"Who's there?"
|
||||
"World."
|
||||
"World who?"
|
||||
"World you like to say hello back?"
|
||||
|
||||
## Fun Fact
|
||||
|
||||
This page has achieved more in 10 seconds than I have all morning.
|
||||
|
||||
*PS: If you're reading this, you've successfully discovered the most important
|
||||
page on the internet. Congratulations! 🎉*
|
||||
33
mkdocs.yml
Normal file
33
mkdocs.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
# Project information
|
||||
site_name: PSI Data Catalog Documentation
|
||||
site_url: https://data-catalog-services.pages.psi.ch
|
||||
|
||||
# Repository
|
||||
repo_name: data-catalog-services/gitea-pages
|
||||
repo_url: https://gitea.psi.ch/data-catalog-services/gitea-pages
|
||||
|
||||
# Copyright
|
||||
copyright: Copyright © 2025 Paul Scherrer Institute
|
||||
|
||||
# Configuration
|
||||
theme:
|
||||
name: material
|
||||
palette:
|
||||
- media: "(prefers-color-scheme)"
|
||||
toggle:
|
||||
icon: material/link
|
||||
name: Switch to light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
primary: teal
|
||||
accent: teal
|
||||
toggle:
|
||||
icon: material/toggle-switch
|
||||
name: Switch to dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
primary: teal
|
||||
accent: teal
|
||||
toggle:
|
||||
icon: material/toggle-switch-off
|
||||
name: Switch to system preference
|
||||
Reference in New Issue
Block a user