mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2026-02-10 12:21:34 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4e69017a7 | ||
|
|
e361946409 | ||
|
|
ef7661905b | ||
|
|
780ca3f8cd | ||
|
|
4fe9084ffa |
17
action.yml
17
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,7 +14,7 @@ runs:
|
||||
steps:
|
||||
- name: Archive artifact
|
||||
shell: bash
|
||||
if: runner.os != 'Windows'
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
tar \
|
||||
--dereference --hard-dereference \
|
||||
@@ -24,6 +24,19 @@ runs:
|
||||
--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
|
||||
|
||||
Reference in New Issue
Block a user