Merge pull request #1280 from hypercerts-org/feat/deploy_base_and_bas… #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge. | |
name: deploy-defender | |
env: | |
OPENZEPPELIN_DEFENDER_ADMIN_API_KEY: ${{ secrets.OPENZEPPELIN_DEFENDER_ADMIN_API_KEY }} | |
OPENZEPPELIN_DEFENDER_ADMIN_API_SECRET: ${{ secrets.OPENZEPPELIN_DEFENDER_ADMIN_API_SECRET }} | |
CONTRACT_ADDRESS: ${{ vars.CONTRACT_ADDRESS }} | |
# Trigger the workflow when: | |
on: | |
# A push occurs to one of the matched branches. | |
push: | |
branches: | |
- main | |
- develop | |
paths: | |
- defender/** | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy-defender: | |
# NOTE: This name appears in GitHub's Checks API. | |
name: deploy-defender | |
environment: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.9.0 | |
- name: Set up Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
cache: "pnpm" | |
node-version: "18.18.0" | |
- name: Install | |
run: pnpm install --frozen-lockfile | |
- name: Deploy Defender infra to testnets | |
if: github.ref == 'refs/heads/develop' | |
run: pnpm run deploy:defender:test | |
- name: Deploy Defender infra to mainnets | |
if: github.ref == 'refs/heads/main' | |
run: pnpm run deploy:defender:prod |