-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.5 KB
/
Copy pathpack.yml
File metadata and controls
48 lines (40 loc) · 1.5 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
name: Publish docs
# Publishes this repo's headless documentation build to the knowledge base.
#
# Trigger: publish a GitHub Release, e.g.
# gh release create v2.0.0 --generate-notes
# The publish action validates kb-docs.json and the built HTML against the
# knowledge base contract, packs kb-docs.tar.gz and attaches it to that release.
# The knowledge base downloads the asset on its next build.
#
# This repo is the template other docs repos copy. Keep this file minimal:
# checkout, setup-python, build, one `uses:`.
on:
release:
types: [published]
workflow_dispatch:
inputs:
release-tag:
description: 'Existing release to attach kb-docs.tar.gz to (defaults to the latest release)'
required: false
permissions:
contents: write # the action uploads a release asset
jobs:
publish:
name: Build headless + publish to the knowledge base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build (headless)
run: python scripts/pack.py --headless
- uses: AbsaOSS/knowledge-base/actions/publish-docs@v1
with:
manifest: kb-docs.json
dist: dist
release-tag: ${{ inputs.release-tag || github.event.release.tag_name }}
# Wire these once a deployment repository exists (AbsaOSS/knowledge-base#78):
# notify-repo: AbsaOSS/<deployment-repo>
# notify-token: ${{ secrets.KB_NOTIFY_TOKEN }}