-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Avoid upload-pages-artifact action in GitHub Pages workflow
#3502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 }} | ||
| - 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 | ||
|
||
| retention-days: 1 | ||
| if-no-files-found: error | ||
|
Comment on lines
+106
to
+109
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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_PATHbeing renamed toOUTPUT_PATHto match the name used elsewhere in our file.In v4.0.0 upload-pages-artifact just added
--exclude=".[^/]*"to thetarcommand to exclude hidden files.