Skip to content
This repository was archived by the owner on Aug 21, 2026. It is now read-only.

CI

CI #256

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 2 * * *' # every day at 02:00 UTC
workflow_dispatch:
jobs:
documentation:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
- name: Restore cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
- name: Build docs
run: |
npm run antora
# Build the Pagefind search index and fail the build if it is empty.
# pagefind exits 0 even when it indexes nothing (e.g. the output dir
# moved or no indexable pages were emitted), which would deploy a site
# with silently broken search. Require a non-trivial page count.
npm run pagefind | tee pagefind.log
grep -qE 'Indexed [1-9][0-9]+ pages' pagefind.log || {
echo '::error::Pagefind indexed fewer than 10 pages - search index looks broken'
exit 1
}
rm -f pagefind.log
echo 'doc.owncloud.com' > public/CNAME
- name: Save cache
if: github.event_name == 'push'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Deploy to GitHub Pages
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages