upload-to-netlify-action

Upload secondary files and artifacts to a Netlify site. For example, you can
compile a LaTeX document to a PDF using Github actions and upload it to your
Netlify site using this action.
All inputs are required to use this action.
Input Name |
Required |
Default |
Description |
source-file |
Yes |
|
One or more files you wish to upload (one per line). |
destination-path |
Yes |
|
A list of absolute paths which each file in source-file should be stored. |
site-name |
Yes |
|
Name of your Netlify site. |
branch-name |
No |
main |
Name of the deploy branch in Netlify. |
netlify-token |
Yes |
|
Netlify personal access token. Use this link to get your own token. |
Notes and Recommendations
Example Usage
This example shows how to use the action to upload a PDF to a Netlify site
called example-site
.
steps:
# Other steps here...
- uses: MrFlynn/upload-to-netlify-action@v3
with:
source-file: src-path/to/file.pdf
destination-path: /destination-path/to/file.pdf
site-name: example-site
branch-name: ${{ github.head_ref || github.ref_name }}
netlify-token: ${{ secrets.NETLIFY_TOKEN }}
Full example usage of this action can be found in
MrFlynn/upload-to-netlify-example.