summaryrefslogtreecommitdiff
path: root/.forgejo/workflows
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-11-21 15:48:24 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2024-11-26 10:54:24 +0100
commitd6987c06f48b61352289181954f5a436c5f2379f (patch)
treec1bfd0e08480fbb083db54d81d16ba1330d9e3af /.forgejo/workflows
parentb701d19e8b8b45226f6cb1090dd160eea989ca7e (diff)
Docs: Move to Mkdocs & Codeberg pages
Diffstat (limited to '.forgejo/workflows')
-rw-r--r--.forgejo/workflows/docs.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.forgejo/workflows/docs.yml b/.forgejo/workflows/docs.yml
new file mode 100644
index 0000000..4976c7b
--- /dev/null
+++ b/.forgejo/workflows/docs.yml
@@ -0,0 +1,40 @@
+env:
+ BUILD_DEPENDENCIES: git make mkdocs python3-markdown-include python3-pip
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ test:
+ runs-on: docker
+ container:
+ image: debian:latest
+ steps:
+ - name: Install OS Dependencies
+ run: |
+ apt-get update
+ apt-get install --yes $BUILD_DEPENDENCIES
+ - name: Install Mkdocs Mermaid plugin
+ run: python3 -m pip install --break-system-packages mkdocs-mermaid2-plugin
+ - name: Clone Repository
+ run: |
+ mkdir app
+ git clone -b ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} app
+ - name: Build docs
+ run: |
+ cd app
+ make docs
+ - name: Copy all files
+ run: |
+ cp -r app/docs/site/* .
+ rm -rf app
+ - name: Deploy with git
+ run: |
+ git init
+ git config --global user.name "Codeberg Pages"
+ git config --global user.email ""
+ git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@codeberg.org/eduVPN/eduvpn-common
+ git checkout -b pages
+ git add --all
+ git commit -am "Pages: Deploy $GITHUB_SHA" && git push --force -u origin pages