Просмотр исходного кода

enhance(ci): add push trigger and conditional execution for build-docs workflow

charlie 3 месяцев назад
Родитель
Сommit
ad109277bf
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      .github/workflows/build-plugin-docs.yml

+ 6 - 0
.github/workflows/build-plugin-docs.yml

@@ -2,10 +2,16 @@ name: Build and Sync Plugin Docs
 
 on:
   workflow_dispatch:
+  push:
+    branches:
+      - master
 
 jobs:
   build-and-sync-docs:
     runs-on: ubuntu-latest
+    # Only run on manual trigger or when the commit message starts with "chore(libs): bump version"
+    if:
+      github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'chore(libs): bump version')
 
     steps:
       - name: Checkout logseq repository