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
22 changes: 20 additions & 2 deletions .github/workflows/github_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,28 @@ jobs:
chmod -c -R +rX "${{ inputs.output-path }}" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Archive artifact
shell: sh
run: |
echo "::group::Archive artifact"
tar \
--dereference \
--hard-dereference \
--directory "$OUTPUT_PATH" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
echo "::endgroup::"
env:
OUTPUT_PATH: ${{ inputs.output-path }}
Comment on lines +88 to +102
Copy link
Copy Markdown
Contributor Author

@seanh seanh Oct 4, 2025

Choose a reason for hiding this comment

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

This is exactly the same as the "Archive artifact" step from upload-pages-artifact@v3.0.1 other than INPUT_PATH being renamed to OUTPUT_PATH to match the name used elsewhere in our file.

In v4.0.0 upload-pages-artifact just added --exclude=".[^/]*" to the tar command to exclude hidden files.

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ inputs.output-path }}
name: github-pages
path: ${{ runner.temp }}/artifact.tar
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

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

The path reference uses ${{ runner.temp }} but the tar command creates the file at $RUNNER_TEMP/artifact.tar. GitHub Actions expressions should be consistent - either use ${{ runner.temp }} in both places or $RUNNER_TEMP in both places.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

@seanh seanh Oct 4, 2025

Choose a reason for hiding this comment

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

I'm going to ignore Copilot's suggestion here because I'm following the style of GitHub's own actions (upload-pages-artifact and upload-artifact): for whatever reason they don't use variable references like ${{ runner.temp }} in inline shell scripts within the workflow, but instead use env: to make those variables available to the shell scripts as $RUNNER_TEMP.

retention-days: 1
if-no-files-found: error
Comment on lines +106 to +109
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These options are the same as how upload-pages-artifact calls upload-artifact.

deploy:
concurrency:
group: "pages"
Expand Down