summaryrefslogtreecommitdiff
path: root/.forgejo/workflows/docs.yml
diff options
context:
space:
mode:
Diffstat (limited to '.forgejo/workflows/docs.yml')
-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