File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
layouts/partials/docs/inject Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 55 branches : [main]
66 paths :
77 - ' docs/**'
8+ - ' charts/kup6s-pages/Chart.yaml'
89 - ' .github/workflows/docs.yaml'
10+ workflow_dispatch :
911
1012jobs :
1113 build-and-deploy :
2123 hugo-version : ' latest'
2224 extended : true
2325
26+ - name : Generate build info
27+ run : |
28+ VERSION=$(grep '^version:' charts/kup6s-pages/Chart.yaml | awk '{print $2}')
29+ BUILD_DATE=$(date -u +'%Y-%m-%d')
30+ mkdir -p docs/data
31+ cat > docs/data/build.yaml << EOF
32+ version: "${VERSION}"
33+ date: "${BUILD_DATE}"
34+ EOF
35+
2436 - name : Build docs
2537 run : hugo --source docs --minify
2638
Original file line number Diff line number Diff line change 6969 runs-on : ubuntu-latest
7070 needs : test
7171 permissions :
72+ actions : write
7273 contents : write
7374 packages : write
7475 steps :
@@ -110,3 +111,8 @@ jobs:
110111 git add charts/kup6s-pages/Chart.yaml
111112 git commit -m "chore: bump Chart.yaml to ${{ steps.version.outputs.version }} [skip ci]"
112113 git push origin main
114+
115+ - name : Trigger docs rebuild
116+ run : gh workflow run docs.yaml
117+ env :
118+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ # Hugo build output
2+ public /
3+ resources /
4+
5+ # Generated at build time
6+ data /build.yaml
Original file line number Diff line number Diff line change 1+ < hr />
2+ < p style ="text-align: center; font-size: 0.85em; color: var(--gray-500); ">
3+ {{ with .Site.Data.build }}Version {{ .version }} | Built {{ .date }}{{ end }}
4+ </ p >
You can’t perform that action at this time.
0 commit comments