From ae79b544cb4c1f6d913f952beca798032f3613a3 Mon Sep 17 00:00:00 2001 From: Sthope Date: Mon, 18 Apr 2022 10:10:45 +0200 Subject: [PATCH] Initial commit --- .github/workflows/deploy.yml | 40 +++++++++++++++++ .gitignore | 85 ++++++++++++++++++++++++++++++++++++ Dockerfile | 4 ++ README.md | 0 docker-compose.yaml | 10 +++++ docs/index.md | 0 mkdocs-example.md | 77 ++++++++++++++++++++++++++++++++ mkdocs.yml | 67 ++++++++++++++++++++++++++++ requirements.txt | 6 +++ 9 files changed, 289 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yaml create mode 100644 docs/index.md create mode 100644 mkdocs-example.md create mode 100644 mkdocs.yml create mode 100644 requirements.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..45a7be7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy to VPS + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # Build + - name: Pull latest changes on VPS + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.VPS_HOST }} + USERNAME: ${{ secrets.VPS_DEPLOY_USER }} + PORT: ${{ secrets.VPS_SSH_PORT }} + KEY: ${{ secrets.VPS_SSHKEY }} + script: cd ${{ secrets.VPS_PROJECT_PATH }} && git fetch && git checkout main && git pull + - name: Build + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.VPS_HOST }} + USERNAME: ${{ secrets.VPS_DEPLOY_USER }} + PORT: ${{ secrets.VPS_SSH_PORT }} + KEY: ${{ secrets.VPS_SSHKEY }} + script: cd ${{ secrets.VPS_PROJECT_PATH }} && docker-compose run mkdocswiki build + + # Deploy + - name: Deploy new image and cleanup + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.VPS_HOST }} + USERNAME: ${{ secrets.VPS_DEPLOY_USER }} + PORT: ${{ secrets.VPS_SSH_PORT }} + KEY: ${{ secrets.VPS_SSHKEY }} + script: docker-compose -f ~/docker-compose.yml up -d && docker image prune -af diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2544858 --- /dev/null +++ b/.gitignore @@ -0,0 +1,85 @@ +# ignore rendered site +site/ + +# Created by https://www.toptal.com/developers/gitignore/api/vscode,macos,windows,linux +# Edit at https://www.toptal.com/developers/gitignore?templates=vscode,macos,windows,linux + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### vscode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/vscode,macos,windows,linux \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dc7df16 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM squidfunk/mkdocs-material:7.1.9 + +COPY requirements.txt /docs/requirements.txt +RUN pip install -U -r /docs/requirements.txt \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..d0cf0e4 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +version: "3.3" + +services: + pms-wiki: + build: . + image: sthope/mksdocswiki + volumes: + - .:/docs + ports: + - 8000:8000 diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..e69de29 diff --git a/mkdocs-example.md b/mkdocs-example.md new file mode 100644 index 0000000..bcb5c10 --- /dev/null +++ b/mkdocs-example.md @@ -0,0 +1,77 @@ +--- +title: mkdocs syntax testing +--- + +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +!!! info + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod + nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor + massa, nec semper lorem quam in massa. + +## Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. + +Here is an example[^1] of a footnote[^2]. + +[^1]: This is the linked footnote explanation. +[^2]: + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod + nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor + massa, nec semper lorem quam in massa. + +## Abbreviation expansion + +The HTML specification is maintained by the W3C. + +## Insert key presses + +Here is more stuff. ++ctrl+alt+delete++ then press ++v+alt+shift++. + +## Code snippets + +=== "bash" + + ``` bash + #include + + int main(void) { + printf("Hello world!\n"); + return 0; + } + ``` + + Does this work with a superfence? + +=== "C++" + + ``` c++ hl_lines="2 3" + #include + + int main(void) { + std::cout << "Hello world!" << std::endl; + return 0; + } + ``` + +![alex](images/alex.jpg){: align=right width=200 } + +

+alex +

+ +*[HTML]: Hyper Text Markup Language +*[W3C]: World Wide Web Consortium \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..1c0ec77 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,67 @@ +site_name: Perfect Media Server +repo_url: https://github.com/IronicBadger/pms-wiki +repo_name: ironicbadger/pms-wiki +edit_uri: edit/main/docs/ + +theme: + name: material + language: en + #logo: images/site/logo.png + favicon: images/assets/favicon.png + icon: + repo: fontawesome/brands/github + logo: fontawesome/regular/folder-open + palette: + - scheme: default + primary: blue + accent: teal + toggle: + icon: material/weather-night + name: Switch to dark mode + - scheme: slate + toggle: + icon: material/weather-sunny + name: Switch to light mode + font: + code: Jet Brains Mono + features: + - navigation.instant + #- navigation.sections # prevents collapsible sections + #- navigation.expand #expands sections by default + # insiders only + # - search.suggest + +# google_analytics: ['', 'auto'] + +plugins: + - git-revision-date + - search + - minify: + minify_html: true +markdown_extensions: + - abbr + - admonition # enables coloured blocks mid article + - attr_list # improves image handling + - pymdownx.details # enables collapsible admonitions + - footnotes + - meta # adds support for front matter + - toc: + permalink: true + toc_depth: 4 + - pymdownx.highlight: # code highlighting + linenums: true + - pymdownx.tabbed # enables tabs for embedded blocks + - pymdownx.snippets + - pymdownx.superfences # allows for the nesting of code blocks inside other blocks + - pymdownx.keys + +copyright: 2022 © Sthope - Licensed under MIT +extra: + social: + - icon: 'fontawesome/brands/github' + link: 'https://github.com/Sthopeless' + name: GitHub + + +nav: + - Wiki: 'index.md' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..fc3a7d3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +mkdocs==1.2.1 +mkdocs-material==7.1.9 +mkdocs-material-extensions==1.0.1 +mkdocs-minify-plugin==0.4.0 +mkdocs-git-revision-date-plugin==0.3.1 +pymdown-extensions==8.2