Skip to content

Commit fe50812

Browse files
committed
docs: add workflow for publishing docs to gh-pages
Signed-off-by: Mirza Kopic <[email protected]>
1 parent f11df79 commit fe50812

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/gh-pages.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and publish mkdocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
13+
deploy:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
19+
- uses: actions/checkout@v4
20+
21+
- name: Configure Git Credentials
22+
run: |
23+
git config user.name kcp-ci-bot
24+
git config user.email [email protected]
25+
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.10'
29+
cache: 'pip'
30+
31+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
32+
33+
- uses: actions/cache@v4
34+
with:
35+
key: mkdocs-material-${{ env.cache_id }}
36+
path: .cache
37+
restore-keys: |
38+
mkdocs-material-
39+
40+
- run: pip install mkdocs-material mkdocs-macros-plugin mkdocs-awesome-pages-plugin mkdocs-static-i18n
41+
42+
- run: cd docs && mkdocs gh-deploy --force

docs/content/publish-resources.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,10 @@ spec:
396396
replacement: "bar-\\1"
397397
398398
# or
399+
{% raw %}
399400
template:
400401
template: "{{ .Name }}-foo"
402+
{% endraw %}
401403
402404
# Like with references, the namespace can (or must) be configured explicitly.
403405
# You do not need to also use label selectors here, you can mix and match
@@ -413,7 +415,7 @@ spec:
413415
#### Templates
414416

415417
The third option to configure how to find/create related objects are templates. These are simple
416-
Go template strings (like `{{ .Variable }}`) that allow to easily configure static values with a
418+
Go template strings (like `{% raw %}{{ .Variable }}{% endraw %}`) that allow to easily configure static values with a
417419
sprinkling of dynamic values.
418420

419421
This feature has not been fully implemented yet.

0 commit comments

Comments
 (0)