ci: publish documentation to Gitea Pages
Build and Deploy Documentation / build (push) Failing after 19s

This commit is contained in:
2026-08-11 19:48:39 +00:00
parent 464ea75730
commit b68529e682
2 changed files with 19 additions and 39 deletions
+17 -37
View File
@@ -23,46 +23,26 @@ jobs:
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache pnpm dependencies
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Upload build artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: docusaurus-build
path: build/
retention-days: 7
# Uncomment when deployment target is configured
# deploy:
# needs: build
# runs-on: ubuntu-latest
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# steps:
# - name: Download build artifact
# uses: actions/download-artifact@v4
# with:
# name: docusaurus-build
# path: build/
#
# - name: Deploy to server
# run: |
# # Add deployment steps here (rsync, docker, etc.)
# echo "Deploying documentation..."
- name: Publish to Pages
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'
shell: bash
run: |
set -euo pipefail
ORG_REPO='${{ gitea.repository }}'
case "$ORG_REPO" in
*/*) ;;
*) echo "invalid repository slug: $ORG_REPO" >&2; exit 1 ;;
esac
case "$ORG_REPO" in
*..*|/*|*/|*//* ) echo "unsafe repository slug: $ORG_REPO" >&2; exit 1 ;;
esac
test -f build/index.html
destination="/gondor-v1-gitea-pages/$ORG_REPO"
mkdir -p "$destination"
rsync -a --delete build/ "$destination/"