Skip to main content
Learn how to configure a GitHub Action to set up a Continuous Integration and Continuous Deployment pipeline (CI/CD) with Hardhat on Tenderly Virtual Environments. Use the Tenderly Virtual Environment Setup to enable automated builds that test and deploy your contracts across multiple networks. After successful testing, you can stage them for the rest of your team by deploying them to provisioned Virtual Environments. In this guide, you need to complete two stages:
  1. Local setup: Set up Hardhat and create and test the workflow file.
  2. Github setup: Set up a GitHub Action, configure GitHub secrets and variables, and test the build.
For reference, use this example project:

CI/CD setup with hardhat-ignition

This guide demonstrates a CI setup that relies on Hardhat-ignition. For hardhat-verify setup, the process and configuration are similar.
Continuous integration (CI) and continous deployment (CD) with Virtual Environments

Continuous integration (CI) and continous deployment (CD) with Virtual Environments

Stage 1: Local setup

First, we’ll install necessary dependencies and create a workflow file.

Stage 2: Github Setup

After successful local setup, proceed by configuring Github with environment variables and necessary secrets.

Environment Variables Reference

The GitHub Action exposes the following network-specific variables:

Next steps

Explore other examples: