mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2025-12-08 08:06:18 +00:00
Merge pull request #1 from paper-spa/review-pass
Minor adjustments + retention
This commit is contained in:
27
action.yml
27
action.yml
@@ -1,18 +1,29 @@
|
|||||||
name: 'Upload Pages artifact'
|
name: 'Upload Pages artifact'
|
||||||
description: 'A composite action that prepares your static assets to be deployed to GitHub Pages'
|
description: 'A composite action that prepares your static assets to be deployed to GitHub Pages'
|
||||||
inputs:
|
inputs:
|
||||||
directory:
|
path:
|
||||||
description: 'The directory in your workspace that contains the built assets'
|
description: 'Path of the directoring containing the static assets.'
|
||||||
required: true
|
required: true
|
||||||
default: '_site/'
|
default: '_site/'
|
||||||
|
retention-days:
|
||||||
|
description: 'Duration after which artifact will expire in days.'
|
||||||
|
required: false
|
||||||
|
default: '1'
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Archive build output
|
- name: Archive artifact
|
||||||
run: "tar --dereference --hard-dereference --directory ${{ inputs.directory }} -cvf artifact.tar ."
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
run: |
|
||||||
|
tar \
|
||||||
|
--dereference --hard-dereference \
|
||||||
|
--directory ${{ inputs.path }} \
|
||||||
|
-cvf ${{ runner.temp }}/artifact.tar \
|
||||||
|
--exclude=.git \
|
||||||
|
.
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
with:
|
with:
|
||||||
name: "github-pages"
|
name: github-pages
|
||||||
path: artifact.tar
|
path: ${{ runner.temp }}/artifact.tar
|
||||||
|
retention-days: ${{ inputs.retention-days }}
|
||||||
|
|||||||
Reference in New Issue
Block a user