Create proper tar.gz format for GitHub Pages artifact with required settings #846
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
最新バージョン(v4)の
upload-pages-artifactでは、隠しファイル(特にドットファイル)がアーティファクトに含まれなくなる破壊的変更が加えられました。これにより、Jekyll で生成されるような隠しファイル(.nojekyll、.htaccessなど)が GitHub Pages のデプロイメントから除外され、正常に動作しない可能性があります。この問題を解決するため、
upload-pages-artifact@v3からupload-artifact@v4への移行を実施し、GitHub Pages の要件を満たすように適切な tar.gz 形式でアーティファクトを作成するようにしました。変更内容
.github/workflows/gh-pages.ymlBefore:
After:
また、
deployジョブでも対応する変更を行い、新しいアーティファクト名を指定するようにしました:主な改善点
--dereference --hard-dereferenceオプションにより、Jekyll が生成する重要な隠しファイルが確実に含まれるようになりますretention-days: 1により、不要なストレージ使用を避けながら必要な期間(24時間)アーティファクトを保持しますif-no-files-found: errorにより、ファイルが見つからない場合に明確にエラーとして扱われますupload-artifact@v4の使用により、最新の機能とセキュリティ修正の恩恵を受けられますこの変更により、GitHub Pages のドキュメントデプロイメントが引き続き正常に動作し、隠しファイルも適切に処理されるようになります。
Fixes #845.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.