Bunny.net is a really cheap and functional content delivery platform that makes it easy to host content.
This action performs 3 operations.
- Removes all the files from storage.
- Uploads files and folders to storage.
- Purges an associated pull zone.
Each operation can be activated with their respective upload, remove and purge flags.
All the inputs are required except verbose
It will upload files and folders if true provided.
It will remove all the files from storage before uploading if "true" provided. storageZoneName and storagePassword inputs should be provided.
The name of storage zone where you are connecting to.
The storage endpoint. Default value is storage.bunnycdn.com
The storage password. It should be read and write capable.
The glob pattern to retrieve the files from, like ./dist/**/*.js
The destination directory that should be uploaded to in the bunny storage zone. (Example: www). The destination should not have a trailing / as in www/.
If you want to upload files to a nested directory, you can specify the path to the directory in the destination parameter. For example, if you want to upload files to a directory called assets inside the www directory, you can set the destination parameter to www/assets.
Note that the nested directory will be automatically created by the CDN if it does not already exist.
It will purge the pull zone if "true" provided. pullZoneId and apiKey inputs should be provided.
The API key. You can retrieve your api key from your profile settings
Pull zone ID. You can retrieve your pull zone id directly from here: https://dash.bunny.net/cdn/PULL_ZONE_ID/general/hostnames
Log more stuffs.
- name: Deploy to Bunny.net
uses: djang0dev/bunnynet-storage-deploy@v0
with:
upload: true
remove: true
storageName: ${{ secrets.BUNNY_STORAGE_NAME }}
storageEndpoint: "storage.bunnycdn.com"
storagePassword: ${{ secrets.BUNNY_STORAGE_PASSWORD }}
destination: "test/"
sourcePattern: "./dist/**/*.*"
apiKey: ${{ secrets.BUNNY_API_KEY }}
purgePullZone: true
pullZoneId: ${{ secrets.BUNNY_PULL_ZONE_ID }}
verbose: true
ayeressian/bunnycdn-storage-deploy - An equivalent, I got some issues with and I wanted to use a glob as source and learn some new effect tricks
- Tests
- Convert as CLI if needed