Skip to content

Commit 7476f36

Browse files
authored
Enhance deploy_docs.yml with manual trigger and input
Added workflow_dispatch event to allow manual triggering and language input for documentation deployment.
1 parent 2ccd5a6 commit 7476f36

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/deploy_docs.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
branches: [main]
1010
push:
1111
branches: [main]
12+
workflow_dispatch:
13+
inputs:
14+
language:
15+
description: 'Language to publish (en or cn)'
16+
required: false
17+
default: 'en'
1218

1319
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1420
permissions:
@@ -88,8 +94,12 @@ jobs:
8894
tag: ${{ github.ref_name }}
8995
publish:
9096
name: Publish Documentation Site 🛜
91-
if: github.event.release.prerelease == false && github.event.release.draft == false && github.event.release.tag_name == github.event.repository.default_branch
92-
runs-on: macos-13
97+
if: |
98+
(github.event_name == 'release' &&
99+
github.event.release.prerelease == false &&
100+
github.event.release.draft == false) ||
101+
github.event_name == 'workflow_dispatch'
102+
runs-on: macos-15-intel
93103
needs: generate-docc
94104
strategy:
95105
matrix:

0 commit comments

Comments
 (0)