2025-12-05 08:36:25 +01:00
|
|
|
name: Build Documentation
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
container: catthehacker/ubuntu:act-latest
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
uses: actions/checkout@v6
|
|
|
|
|
|
2025-12-05 08:42:02 +01:00
|
|
|
- name: Install Node.js
|
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
|
with:
|
|
|
|
|
node-version: "latest"
|
|
|
|
|
|
2025-12-05 08:36:25 +01:00
|
|
|
- name: Install uv
|
|
|
|
|
uses: https://github.com/astral-sh/setup-uv@v7
|
|
|
|
|
with:
|
|
|
|
|
enable-cache: true
|
|
|
|
|
|
|
|
|
|
- name: Build documentation
|
|
|
|
|
run: uv run zensical build
|
|
|
|
|
|
|
|
|
|
- name: Upload site artifact
|
2025-12-05 08:44:21 +01:00
|
|
|
uses: forgejo/upload-artifact@v4
|
2025-12-05 08:36:25 +01:00
|
|
|
with:
|
2025-12-05 08:53:31 +01:00
|
|
|
name: docs.zip
|
2025-12-05 08:36:25 +01:00
|
|
|
path: site/
|
|
|
|
|
retention-days: 30
|
2025-12-05 08:53:31 +01:00
|
|
|
|
|
|
|
|
docker:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
needs: build
|
|
|
|
|
container: catthehacker/ubuntu:act-latest
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
uses: actions/checkout@v6
|
|
|
|
|
|
|
|
|
|
- name: Download site artifact
|
|
|
|
|
uses: forgejo/download-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: docs.zip
|
|
|
|
|
path: site/
|
|
|
|
|
|
|
|
|
|
- name: Log in to Container Registry
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
|
registry: ${{ vars.CONTAINER_REGISTRY }}
|
|
|
|
|
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
|
|
|
|
|
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Build and push Docker image
|
|
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
|
with:
|
|
|
|
|
context: .
|
|
|
|
|
push: true
|
|
|
|
|
tags: ${{ vars.CONTAINER_REGISTRY }}/servala/documentation:latest
|
|
|
|
|
cache-from: type=gha
|
|
|
|
|
cache-to: type=gha,mode=max
|