Skip to content

Commit e53264b

Browse files
committed
ci(deploy): wait for translation before deploying blog posts
- Add workflow_run trigger to deploy after Translate workflow completes - Add paths-ignore for blog and blog-en to avoid double deployment - Only deploy on workflow_run if translation succeeded Flow: - Blog post push → Translate runs → Deploy runs once (with translations) - Non-blog push → Deploy runs immediately
1 parent 2d0e081 commit e53264b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
name: Deploy to GitHub Pages
22

33
on:
4+
# 번역 워크플로우 완료 후 배포 (블로그 포스트 변경 시)
5+
workflow_run:
6+
workflows: ["Translate new posts to English"]
7+
types: [completed]
8+
branches: [main]
9+
# 블로그 외 파일 변경 시 즉시 배포
410
push:
511
branches: [main]
12+
paths-ignore:
13+
- 'src/content/blog/**/*.md'
14+
- 'src/content/blog-en/**/*.md'
615
workflow_dispatch:
716

817
permissions:
@@ -17,6 +26,8 @@ concurrency:
1726
jobs:
1827
build:
1928
runs-on: ubuntu-latest
29+
# workflow_run 트리거 시 번역 워크플로우가 성공한 경우에만 실행
30+
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
2031
steps:
2132
- name: Checkout
2233
uses: actions/checkout@v4

0 commit comments

Comments
 (0)