Skip to content

fix: devto ワークフロー診断強化・workflow_dispatch追加#98

Merged
bmf-san merged 1 commit intomainfrom
fix/devto-workflow-diagnostics
Mar 29, 2026
Merged

fix: devto ワークフロー診断強化・workflow_dispatch追加#98
bmf-san merged 1 commit intomainfrom
fix/devto-workflow-diagnostics

Conversation

@bmf-san
Copy link
Copy Markdown
Owner

@bmf-san bmf-san commented Mar 29, 2026

概要

devto-publish ワークフローが連続して失敗している問題を調査・対応したPR。

根本原因の推定

「Post new articles to dev.to」ステップが 1秒以内 で失敗し exit code 1 を返していることから、DEV_TO_API_KEY シークレットが未設定(または空)である可能性が高い。

変更内容

1. DEV_TO_API_KEY 存在確認ステップ追加

投稿ステップの前に明示的なチェックを入れ、未設定の場合は分かりやすいエラーメッセージを出力するようにした。

::error::DEV_TO_API_KEY secret is not set. Please add it under Settings > Secrets and variables > Actions.

2. workflow_dispatch トリガー追加

手動実行を可能にした。投稿済み記事を再投稿したい場合や、ファイルを指定して単発実行したい場合に利用できる。

files: "content/en/posts/introducing-donelog.md content/en/posts/introducing-bookstacks.md"

3. シェルインジェクション修正

for f in ${{ steps.detect.outputs.files }} の直接展開を、環境変数 TARGET_FILES 経由に変更した。

4. 検出ファイルのログ出力追加

Detected files: ... をログに出力し、何が検出されたかを確認しやすくした。

次のアクション(マニュアル対応が必要)

  1. DEV_TO_API_KEY シークレットを確認・設定: Settings > Secrets and variables > Actions > DEV_TO_API_KEY に有効な dev.to API キーを設定してください
  2. このPRをマージ後、workflow_dispatch で未投稿の記事を手動実行して投稿できます:
    • content/en/posts/introducing-asset-trend-simulator.md
    • content/en/posts/introducing-bookstacks.md
    • content/en/posts/introducing-donelog.md

…gger

- Add explicit DEV_TO_API_KEY presence check with a clear error message
- Add workflow_dispatch trigger to allow manual re-runs with specific files
- Fix shell injection: use env var TARGET_FILES instead of direct expression interpolation
- Print detected files for easier debugging
@bmf-san bmf-san self-assigned this Mar 29, 2026
@bmf-san bmf-san added the bug Something isn't working label Mar 29, 2026
@bmf-san bmf-san merged commit 56cc62a into main Mar 29, 2026
2 checks passed
@bmf-san bmf-san deleted the fix/devto-workflow-diagnostics branch March 29, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant