Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #1 from paper-spa/review-pass
Minor adjustments + retention
- Loading branch information
Showing
1 changed file
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |