Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/gh-pages.yml
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
次の条件を満たす必要があります。

なお、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にしてください

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Pages の要件に合わせて、単一の gzip アーカイブとして tar ファイルを作成するように修正しました。retention-days: 1if-no-files-found: error の設定も追加しています。コミット: 8d9e8f7

Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,23 @@ jobs:
uses: actions/jekyll-build-pages@v1
with:
source: ./
- name: Archive artifact
shell: sh
run: |
echo "::group::Archive artifact"
tar \
--dereference --hard-dereference \
--directory "_site" \
-czf "$RUNNER_TEMP/github-pages.tar.gz" \
.
echo "::endgroup::"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-artifact@v4
with:
path: _site
name: github-pages
path: ${{ runner.temp }}/github-pages.tar.gz
retention-days: 1
if-no-files-found: error
deploy:
needs: jekyll-build
permissions:
Expand All @@ -78,3 +91,5 @@ jobs:
steps:
- uses: actions/deploy-pages@v4
id: deployment
with:
artifact-name: github-pages