-
Notifications
You must be signed in to change notification settings - Fork 4
95 lines (79 loc) · 2.24 KB
/
docs.yml
File metadata and controls
95 lines (79 loc) · 2.24 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: "[Reusable] Build and push the web book"
on:
workflow_call:
inputs:
deploy-pages:
type: boolean
required: true
release:
type: boolean
required: true
description: Whether the book should be built in preparation for a release.
jobs:
build-hexdoc:
runs-on: ubuntu-latest
permissions:
contents: read
pages: read
outputs:
pages-url: ${{ steps.build.outputs.pages-url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version-file: .python-version
- uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-includes: |
caches
notifications
loom-cache
- uses: ts-graphviz/setup-graphviz@v2
- name: Sync dependencies
run: uv sync --frozen --no-dev
- name: Build API docs
run: ./gradlew :dokkaGenerate
- id: build
uses: hexdoc-dev/actions/build@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release: ${{ inputs.release }}
deploy-pages:
needs: build-hexdoc
if: inputs.deploy-pages
runs-on: ubuntu-latest
concurrency:
group: hexdoc-deploy-pages
cancel-in-progress: false
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version-file: .python-version
- uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- name: Sync dependencies
run: uv sync --frozen --no-dev
- name: Merge new hexdoc build into existing book
uses: hexdoc-dev/actions/merge@v1
with:
release: ${{ inputs.release }}
site-url: ${{ needs.build-hexdoc.outputs.pages-url }}
- name: Deploy to Pages
uses: hexdoc-dev/actions/deploy-pages@v1
with:
merge: false
release: ${{ inputs.release }}