Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit afa45fe

Browse files
committed
ci: add versioned GitHub pages
1 parent a1576ac commit afa45fe

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ jobs:
121121
target-folder: docs
122122
commit-message: 'chore(GitHub Pages): update site for commit ${{ github.sha }}'
123123

124+
- name: Update GitHub Pages for verion
125+
if: steps.check_version_bump.outputs.release_type == ''
126+
uses: JamesIves/github-pages-deploy-action@v4.3.3
127+
with:
128+
branch: gh-pages
129+
folder: .docc-build
130+
target-folder: docs/${{ steps.check_version_bump.outputs.previous_version }}
131+
commit-message: 'chore(GitHub Pages): update versioned site for commit ${{ github.sha }}'
132+
124133
cd:
125134
name: Build and Publish
126135
if: (github.event_name == 'push' && needs.ci.outputs.release == 'true') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'true')
@@ -156,6 +165,24 @@ jobs:
156165
npm run build-doc
157166
npm run serve-doc
158167
168+
- name: Release GitHub Pages
169+
if: steps.conventional_changelog.outputs.skipped == 'false'
170+
uses: JamesIves/github-pages-deploy-action@v4.3.3
171+
with:
172+
branch: gh-pages
173+
folder: .docc-build
174+
target-folder: docs
175+
commit-message: 'chore(GitHub Pages): release site for tag ${{ steps.conventional_changelog.outputs.tag }}'
176+
177+
- name: Release GitHub Pages for version
178+
if: steps.conventional_changelog.outputs.skipped == 'false'
179+
uses: JamesIves/github-pages-deploy-action@v4.3.3
180+
with:
181+
branch: gh-pages
182+
folder: .docc-build
183+
target-folder: docs/${{ steps.conventional_changelog.outputs.version }}
184+
commit-message: 'chore(GitHub Pages): release versioned site for tag ${{ steps.conventional_changelog.outputs.tag }}'
185+
159186
# - name: Create GitHub Release
160187
# if: steps.conventional_changelog.outputs.skipped == 'false'
161188
# uses: ncipollo/release-action@v1

0 commit comments

Comments
 (0)