Skip to content

Commit 2436721

Browse files
committed
fix: build docs after release in same workflow instead of separate trigger
1 parent 3adab41 commit 2436721

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

.github/workflows/docs.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Deploy Docs
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- 'docs/**'
8-
- 'charts/kup6s-pages/Chart.yaml'
9-
- '.github/workflows/docs.yaml'
104
workflow_dispatch:
115

126
jobs:

.github/workflows/release.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,30 @@ jobs:
118118
git config user.name "github-actions[bot]"
119119
git config user.email "github-actions[bot]@users.noreply.github.com"
120120
git add charts/kup6s-pages/Chart.yaml
121-
git commit -m "chore: bump Chart.yaml to ${{ steps.version.outputs.version }}"
121+
git commit -m "chore: bump Chart.yaml to ${{ steps.version.outputs.version }} [skip ci]"
122122
git push origin main
123+
124+
- name: Setup Hugo
125+
uses: peaceiris/actions-hugo@v3
126+
with:
127+
hugo-version: 'latest'
128+
extended: true
129+
130+
- name: Generate build info
131+
run: |
132+
mkdir -p docs/data
133+
cat > docs/data/build.yaml << EOF
134+
version: "${{ steps.version.outputs.version }}"
135+
date: "$(date -u +'%Y-%m-%d')"
136+
EOF
137+
138+
- name: Build docs
139+
run: hugo --source docs --minify
140+
141+
- name: Deploy docs to docs branch
142+
uses: peaceiris/actions-gh-pages@v4
143+
with:
144+
github_token: ${{ secrets.GITHUB_TOKEN }}
145+
publish_branch: docs
146+
publish_dir: ./docs/public
147+
force_orphan: true

0 commit comments

Comments
 (0)