Deploying with the GitHub Action feature is designed to automate the deployment of scripts directly to bunny.net’s Edge Scripting platform. This action ensures that your edge computing scripts are consistently and efficiently updated in response to changes within your codebase, particularly from specified branches in a GitHub repository.
By integrating this GitHub Action into your workflow, you can enhance the reliability of your deployment process and reduce the need for manual intervention, allowing you to focus on developing reliable, scalable applications for edge networks.
The following GitHub workflow file example demonstrates how to configure this action to deploy a script automatically whenever there is a push to the main branch:
To use this GitHub Action, you will need to provide the following inputs: script_id (required):
The ID of the script you wish to deploy. This should be securely stored as a GitHub secret (SCRIPT_ID).
deploy_key: The deployment key used to authorize the deployment of the script. This should also be securely stored as a GitHub secret (DEPLOY_KEY).
file (required): The path of the script file that will be deployed. Ensure this file exists in your repository or that preceding actions generate it.
The script ID and deploy key are available in the dashboard under Script -> Deployments -> Settings.You should place the workflow file in the .github/workflows folder in your repository. You can adjust the workflow file to suit your own build and deployment pipeline. You can learn more about building workflows in the official GitHub documentation.