Create proper tar.gz format for GitHub Pages artifact with required settings#846
Merged
SorrowBlue merged 3 commits intomainfrom Aug 27, 2025
Merged
Create proper tar.gz format for GitHub Pages artifact with required settings#846SorrowBlue merged 3 commits intomainfrom
SorrowBlue merged 3 commits intomainfrom
Conversation
…kflow Co-authored-by: SorrowBlue <25735189+SorrowBlue@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate from upload-pages-artifact to upload-artifact due to breaking changes
Migrate from upload-pages-artifact to upload-artifact due to breaking changes
Aug 27, 2025
SorrowBlue
requested changes
Aug 27, 2025
Owner
There was a problem hiding this comment.
@copilot
次の条件を満たす必要があります。
- Be named github-pages
- Be a single gzip archive containing a single tar file
なお、upload-pages-artifactでは以下のようた方法でartifact.tarを作成しています。
- name: Archive artifact
shell: sh
if: runner.os == 'macOS'
run: |
echo ::group::Archive artifact
gtar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}
retention-daysは一日(24時間)にしてください
if-no-files-foundはerrorにしてください
Contributor
Author
There was a problem hiding this comment.
GitHub Pages の要件に合わせて、単一の gzip アーカイブとして tar ファイルを作成するように修正しました。retention-days: 1、if-no-files-found: error の設定も追加しています。コミット: 8d9e8f7
…ettings Co-authored-by: SorrowBlue <25735189+SorrowBlue@users.noreply.github.com>
Copilot
AI
changed the title
Migrate from upload-pages-artifact to upload-artifact due to breaking changes
Create proper tar.gz format for GitHub Pages artifact with required settings
Aug 27, 2025
SorrowBlue
approved these changes
Aug 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.