mirror of
https://github.com/web3privacy/data
synced 2024-10-15 18:16:28 +02:00
Create upload-pages-artifact.yaml to have side process for artifact
This commit is contained in:
parent
604f6572fd
commit
c6ee5948b4
1 changed files with 48 additions and 0 deletions
48
.github/workflows/upload-pages-artifact.yaml
vendored
Normal file
48
.github/workflows/upload-pages-artifact.yaml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: "Upload GitHub Pages artifact"
|
||||||
|
description: "A composite action that prepares your static assets to be deployed to GitHub Pages"
|
||||||
|
author: "GitHub"
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: 'Artifact name'
|
||||||
|
required: false
|
||||||
|
default: 'github-pages'
|
||||||
|
path:
|
||||||
|
description: "Path of the directory containing the static assets."
|
||||||
|
required: true
|
||||||
|
default: "_site/"
|
||||||
|
retention-days:
|
||||||
|
description: "Duration after which artifact will expire in days."
|
||||||
|
required: false
|
||||||
|
default: "1"
|
||||||
|
outputs:
|
||||||
|
artifact_id:
|
||||||
|
description: "The ID of the artifact that was uploaded."
|
||||||
|
value: ${{ steps.upload-artifact.outputs.artifact-id }}
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Archive artifact
|
||||||
|
shell: sh
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
echo ::group::Archive artifact
|
||||||
|
tar \
|
||||||
|
--dereference --hard-dereference \
|
||||||
|
--directory "$INPUT_PATH" \
|
||||||
|
-cvf "$RUNNER_TEMP/artifact.tar" \
|
||||||
|
--exclude=.git \
|
||||||
|
--exclude=.github \
|
||||||
|
.
|
||||||
|
echo ::endgroup::
|
||||||
|
env:
|
||||||
|
INPUT_PATH: ${{ inputs.path }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
id: upload-artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.name }}
|
||||||
|
path: ${{ runner.temp }}/artifact.tar
|
||||||
|
retention-days: ${{ inputs.retention-days }}
|
||||||
|
if-no-files-found: error
|
Loading…
Reference in a new issue