From 6f10ee2b4c88f23745260caa1c4bc6b985e0730a Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Mon, 13 Jan 2025 00:36:50 +0100 Subject: [PATCH] Add auto docs build with repository actions. --- .forgejo/workflows/docs.yaml | 24 ++++++++++++++++++++++++ docs/build.sh | 4 ---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 .forgejo/workflows/docs.yaml delete mode 100755 docs/build.sh diff --git a/.forgejo/workflows/docs.yaml b/.forgejo/workflows/docs.yaml new file mode 100644 index 0000000..a4b9f37 --- /dev/null +++ b/.forgejo/workflows/docs.yaml @@ -0,0 +1,24 @@ +on: + push: + tags: + - "*" +jobs: + build_docs: + runs-on: docker + container: + image: docker.zeptotech.net/zeptotech/zig-yarn:1.0.0 + credentials: + username: ${{ vars.DOCKER_REGISTRY_USERNAME }} + password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} + steps: + - uses: actions/checkout@v4 + - run: mkdir -p artifact/api + - run: (cd docs && corepack enable && yarn install) + - run: (cd docs && yarn docs:build) + - run: mv docs/.vitepress/dist/* artifact + - run: zig build docs + - run: mv zig-out/docs/* artifact/api + - uses: actions/upload-artifact@v4 + with: + name: docs + path: artifact diff --git a/docs/build.sh b/docs/build.sh deleted file mode 100755 index cd1dc28..0000000 --- a/docs/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -yarn docs:build -(cd .vitepress/dist && tar cvzf docs.tar.gz * && mv docs.tar.gz ../..)