Skip to content

Conversation

@mozumasu
Copy link
Owner

@mozumasu mozumasu commented Sep 7, 2025

問題

GitHub ActionsのワークフローでPages設定時にエラーが発生:

Error: Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions

原因

GitHub Pagesが事前に有効化されていない場合、actions/configure-pagesがエラーになる

解決策

configure-pagesアクションにenablement: trueパラメータを追加して、GitHub Pagesを自動的に有効化

変更内容

- name: Setup Pages
  uses: actions/configure-pages@v4
  with:
    enablement: true  # 追加: GitHub Pagesを自動的に有効化

影響

  • GitHub Pagesが未設定でもワークフローが成功する
  • 手動でSettings > Pagesを設定する必要がなくなる
  • 初回デプロイがよりスムーズに

テスト

  • ワークフローが正常に実行される
  • GitHub Pagesが自動的に有効化される
  • デプロイが成功する

Add enablement parameter to configure-pages action to automatically
enable GitHub Pages if not already configured.
@mozumasu mozumasu closed this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants