Skip to content

Commit 78cb863

Browse files
committed
refactor: separate docs deployment into own job in release workflow
1 parent 8692707 commit 78cb863

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/release.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ jobs:
6969
runs-on: ubuntu-latest
7070
needs: test
7171
permissions:
72-
actions: write
7372
contents: write
7473
packages: write
74+
outputs:
75+
version: ${{ steps.version.outputs.version }}
7576
steps:
7677
- uses: actions/checkout@v6
7778
with:
@@ -121,6 +122,17 @@ jobs:
121122
git commit -m "chore: bump Chart.yaml to ${{ steps.version.outputs.version }} [skip ci]"
122123
git push origin main
123124
125+
docs-deploy:
126+
name: Deploy Documentation
127+
runs-on: ubuntu-latest
128+
needs: helm-publish
129+
permissions:
130+
contents: write
131+
steps:
132+
- uses: actions/checkout@v6
133+
with:
134+
ref: main # Checkout updated main with new Chart.yaml version
135+
124136
- name: Setup Hugo
125137
uses: peaceiris/actions-hugo@v3
126138
with:
@@ -131,14 +143,14 @@ jobs:
131143
run: |
132144
mkdir -p docs/data
133145
cat > docs/data/build.yaml << EOF
134-
version: "${{ steps.version.outputs.version }}"
146+
version: "${{ needs.helm-publish.outputs.version }}"
135147
date: "$(date -u +'%Y-%m-%d')"
136148
EOF
137149
138150
- name: Build docs
139151
run: hugo --source docs --minify
140152

141-
- name: Deploy docs to docs branch
153+
- name: Deploy to docs branch
142154
uses: peaceiris/actions-gh-pages@v4
143155
with:
144156
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)