Deploy previously created cross-workflow artifact to Github Pages.
I've created this to overcome 2 main goals:
- Allow for cross workflow artifact selection
- Save steps compared to using
action/upload-pages-artifact
andaction/deploy-pages
where you must first create or download an existing artifact soaction/upload-pages-artifact
can create a.tar
artifact and upload to the current workflow, and then deploy it byaction/deploy-pages
.
This actions does it all in one go, it:
- Searches for a previously created artifact by the given name across workflows
- Without downloading it, deploys the found artifact to Github Pages
This makes this task faster and saves on your build minutes, at least for my ise case, hope it can be useful to others.
Cheers ;)
Required: The name artifact to search on previous workflows.
Optional: Workflow name or workflow filename to filter artifacts by
Optional Only consider artifacts from workflows on this branch name
Optional Only consider artifacts from workflows on this branch name
Optional Time in milliseconds after which to timeout and cancel the deployment [default is 10 minutes (60000)]
Optional Time in milliseconds between two deployment status report [default is 5 seconds (5000)]
Optional Maximum number of status report errors before cancelling a deployment [default is 5]
Optional Choose how to exit the action if no artifact is found fail, warn or ignore
The deployment status
The error message, if an error occurs
The deployed Github page url
JSON object of the deployed artifact
...
jobs:
deploy:
- name: Deploy to pages
uses: jairmilanes/deploy-pages@v1
with:
artifact_name: github-pages
token: ${{secrets.TOKEN}}