Files
upload-pages-artifact/action.yml
Yoann Chaudet 9bd2be6899 Merge pull request #1 from actions/doc
Document artifacts validation + reformat a few things
2022-07-13 12:15:18 -07:00

31 lines
904 B
YAML

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."
required: true
default: "_site/"
retention-days:
description: "Duration after which artifact will expire in days."
required: false
default: "1"
runs:
using: composite
steps:
- name: Archive artifact
shell: bash
run: |
tar \
--dereference --hard-dereference \
--directory ${{ inputs.path }} \
-cvf ${{ runner.temp }}/artifact.tar \
--exclude=.git \
--exclude=.github \
.
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: ${{ inputs.retention-days }}