Skip to content

Commit f82f73d

Browse files
committed
fix(ci): fix wiki sync skipping and add manual trigger
- Remove push-only condition that caused wiki sync to skip on workflow_dispatch and after pages deploy - Add 'wiki_only' input to workflow_dispatch — when set to 'true', skips pages build/deploy and only syncs wiki - Use always() + result check so sync-wiki runs after both successful deploy AND when deploy is skipped (wiki-only mode) Usage: - Push to docs/ → builds pages + syncs wiki (both) - Manual trigger (wiki_only=false) → builds pages + syncs wiki - Manual trigger (wiki_only=true) → syncs wiki only (fast)
1 parent 0b9551f commit f82f73d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ on:
1010
- 'scripts/collect-labs.sh'
1111
- 'LABS.md'
1212
workflow_dispatch:
13+
inputs:
14+
wiki_only:
15+
description: 'Sync wiki only (skip pages deploy)'
16+
required: false
17+
default: 'false'
18+
type: choice
19+
options:
20+
- 'false'
21+
- 'true'
1322

1423
permissions:
1524
contents: write
@@ -23,6 +32,7 @@ concurrency:
2332
jobs:
2433
build:
2534
runs-on: ubuntu-latest
35+
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.wiki_only == 'true') }}
2636
steps:
2737
- name: Checkout
2838
uses: actions/checkout@v4
@@ -56,15 +66,16 @@ jobs:
5666
url: ${{ steps.deployment.outputs.page_url }}
5767
runs-on: ubuntu-latest
5868
needs: build
69+
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.wiki_only == 'true') }}
5970
steps:
6071
- name: Deploy to GitHub Pages
6172
id: deployment
6273
uses: actions/deploy-pages@v4
6374

6475
sync-wiki:
6576
runs-on: ubuntu-latest
66-
needs: deploy
67-
if: github.event_name == 'push'
77+
needs: [deploy]
78+
if: ${{ always() && (needs.deploy.result == 'success' || needs.deploy.result == 'skipped') }}
6879
steps:
6980
- name: Checkout main repo
7081
uses: actions/checkout@v4

0 commit comments

Comments
 (0)