Repository navigation
47 lines (43 loc) · 1.69 KB
/
Copy pathdocs.yml
File metadata and controls
47 lines (43 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-License-Identifier: LGPL-3.0-only
# SPDX-FileCopyrightText: Copyright (C) 2026 mplx <mplx@jennifer-lang.dev>
#
# Build the book from docs/ with Jennifer's Grimoire and publish it to GitHub
# Pages, through Grimoire's shared workflow:
# https://grimoire.jennifer-lang.dev/github-pages.html
#
# The site root is the book as it stood at the highest release tag (plain
# MAJOR.MINOR.PATCH, the tags release.yml builds), so a reader of the latest
# release reads that release's documentation. Until the first release, main is
# published at the root. Unreleased documentation is not published (no `/dev/`;
# `dev` defaults to false). A pull request builds the book, so a broken outline
# fails before it is merged, but never publishes.
#
# `uses` and `image` are pinned to the same Grimoire release; move both
# together.
#
# A release does not trigger this workflow by its tag: release.yml dispatches
# it on the default branch once the release exists, and that build publishes
# the highest tag. See the `docs` job in release.yml for why.
#
# One-time manual step: Settings -> Pages -> Source -> GitHub Actions.
name: docs
on:
push:
# Before the first release every merge refreshes the root; afterwards a
# push to main only republishes the same release.
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
pages:
# A called workflow can narrow what it is given but never widen it, so the
# Pages deployment permissions are granted here.
permissions:
contents: read
pages: write
id-token: write
uses: jennifer-language/grimoire/.github/workflows/docs-pages.yml@0.4.0
with:
image: ghcr.io/jennifer-language/grimoire:0.4.0