mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2026-02-10 20:31:36 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4e69017a7 | ||
|
|
e361946409 | ||
|
|
ef7661905b | ||
|
|
780ca3f8cd | ||
|
|
4fe9084ffa | ||
|
|
ceec27c96b | ||
|
|
4143b6e8b8 |
31
action.yml
31
action.yml
@@ -2,7 +2,7 @@ name: "Upload Pages artifact"
|
||||
description: "A composite action that prepares your static assets to be deployed to GitHub Pages"
|
||||
inputs:
|
||||
path:
|
||||
description: "Path of the directoring containing the static assets."
|
||||
description: "Path of the directory containing the static assets."
|
||||
required: true
|
||||
default: "_site/"
|
||||
retention-days:
|
||||
@@ -14,6 +14,7 @@ runs:
|
||||
steps:
|
||||
- name: Archive artifact
|
||||
shell: bash
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
tar \
|
||||
--dereference --hard-dereference \
|
||||
@@ -22,6 +23,34 @@ runs:
|
||||
--exclude=.git \
|
||||
--exclude=.github \
|
||||
.
|
||||
|
||||
# Switch to gtar (GNU tar instead of bsdtar which is the default in the MacOS runners so we can use --hard-dereference)
|
||||
- name: Archive artifact
|
||||
shell: bash
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
gtar \
|
||||
--dereference --hard-dereference \
|
||||
--directory ${{ inputs.path }} \
|
||||
-cvf ${{ runner.temp }}/artifact.tar \
|
||||
--exclude=.git \
|
||||
--exclude=.github \
|
||||
.
|
||||
|
||||
# Massage the paths for Windows only
|
||||
- name: Archive artifact
|
||||
shell: bash
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
tar \
|
||||
--dereference --hard-dereference \
|
||||
--directory "${{ inputs.path }}" \
|
||||
-cvf "${{ runner.temp }}\artifact.tar" \
|
||||
--exclude=.git \
|
||||
--exclude=.github \
|
||||
--force-local \
|
||||
"."
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user