Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Site

# Builds the documentation site and publishes it to GitHub Pages from main,
# serving at https://jlt-commons.github.io/raylib-android/.
#
# The build itself lives in jlt-commons/ci-builds, shared by every project so
# the scaffolding is fixed in one place. What stays here is what is actually
# this project's: the content under docs/, its config in docs/site.edn, the
# base path below, and the assertions in docs/check-site.sh.
#
on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

# Deploys must not race, and a half-applied Pages deployment is worse than a
# slightly stale one, so main is never cancelled. Pull request builds are
# scoped per ref and cancel their own earlier runs.
concurrency:
group: site-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
site:
uses: jlt-commons/ci-builds/.github/workflows/site.yml@main
with:
base-path: /raylib-android
permissions:
contents: read
pages: write
id-token: write
11 changes: 3 additions & 8 deletions docs/check-site.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/usr/bin/env bash
# Assertions this project's documentation build must satisfy.
#
# NOTHING IN CI RUNS THIS at the moment. The site workflow that did -- a call
# into the shared one in jlt-commons/ci-builds -- was removed while this
# repository is private, because GitHub Pages is unavailable for a private
# repository on this plan and its deploy job therefore failed on every push.
# Restoring it means restoring .github/workflows/site.yml, which is one call to
# jlt-commons/ci-builds/.github/workflows/site.yml@main with
# base-path: /raylib-android.
# Run by the shared site workflow in jlt-commons/ci-builds against the freshly
# built _site, with BASE_PATH exported.
#
# So run it by hand, from a docs-engine checkout:
# Run it locally the same way, from a docs-engine checkout:
# bb build <path to this repo> && cd <this repo> \
# && BASE_PATH=/raylib-android bash docs/check-site.sh

Expand Down
10 changes: 3 additions & 7 deletions docs/site.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
;; docs-engine (https://github.com/jlt-commons/docs-engine).
;;
;; Build it locally from a docs-engine checkout with `bb build <this repo>`,
;; or `bb serve <this repo>` to preview.
;;
;; NOTHING PUBLISHES IT at the moment. The workflow that did was removed while
;; this repository is private: GitHub Pages is unavailable for a private
;; repository on this plan, so its deploy step failed on every push. This file
;; and everything it configures are kept ready for the day it is restored,
;; which is one call to jlt-commons/ci-builds/.github/workflows/site.yml@main.
;; or `bb serve <this repo>` to preview. CI builds and publishes it from
;; .github/workflows/site.yml, which calls the shared workflow in
;; jlt-commons/ci-builds.
{;; :base-path is what makes this a project site rather than an org one. The
;; site is served at https://jlt-commons.github.io/raylib-android/, so every URL
;; the engine emits needs that prefix. Leave it out and the pages still
Expand Down