From dcb017a5309cab7d598a479c638253006a817929 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Tue, 24 May 2022 11:12:29 -0700 Subject: [PATCH 1/2] Minor adjustments + retention --- action.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 781cee2..ea1f33f 100644 --- a/action.yml +++ b/action.yml @@ -1,18 +1,29 @@ name: 'Upload Pages artifact' description: 'A composite action that prepares your static assets to be deployed to GitHub Pages' inputs: - directory: - description: 'The directory in your workspace that contains the built assets' + 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 build output - run: "tar --dereference --hard-dereference --directory ${{ inputs.directory }} -cvf artifact.tar ." + using: composite + steps: + - name: Archive artifact shell: bash + run: -| + tar \ + --dereference --hard-dereference \ + --directory ${{ inputs.path }} \ + -cvf ${{ runner.temp }}/artifact.tar \ + --exclude=.git \ + . - name: Upload artifact uses: actions/upload-artifact@main with: - name: "github-pages" - path: artifact.tar + name: github-pages + path: ${{ runner.temp }}/artifact.tar + retention-days: ${{ inputs.retention-days }} From 2bcc3967518b361be6a7de37092e05f435f2b7e5 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Tue, 24 May 2022 14:30:41 -0700 Subject: [PATCH 2/2] Fix typo --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ea1f33f..c97901d 100644 --- a/action.yml +++ b/action.yml @@ -14,7 +14,7 @@ runs: steps: - name: Archive artifact shell: bash - run: -| + run: | tar \ --dereference --hard-dereference \ --directory ${{ inputs.path }} \