Files
Documentation/.gitea/workflows/gitea-actions.yml
T
Shaz be6c9414a0
Build and deploy Docusaurus / build-and-deploy (push) Failing after 0s
1000
2026-03-06 01:50:31 +01:00

42 lines
1.2 KiB
YAML

name: Build and deploy Docusaurus
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: homelab
steps:
- name: Bootstrap Node 20
run: |
if command -v node >/dev/null 2>&1 && node --version | grep -q "^v20"; then
echo "Node 20 already installed: $(node --version)"
exit 0
fi
apt-get update -qq
apt-get install -y -qq curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y -qq nodejs
node --version && npm --version
- name: Checkout
run: |
git clone http://oauth2:${{ gitea.token }}@192.168.1.18:3000/${{ gitea.repository }}.git .
git checkout ${{ gitea.sha }}
- name: Build
run: cd docs-site && npm ci && npm run build
- name: Deploy
run: |
echo "=== Running as: $(whoami) on $(hostname) ==="
echo "=== Mounts containing 'docusaurus': ==="
mount | grep docusaurus || echo "(none — host mode is NOT active)"
rm -rf /srv/www/docusaurus/*
cp -r docs-site/build/. /srv/www/docusaurus/
echo "=== Deployed files: ==="
ls /srv/www/docusaurus