Skip to content

Helloworld Daily Deploy #533

Helloworld Daily Deploy

Helloworld Daily Deploy #533

name: Helloworld Daily Deploy
on:
push:
paths:
- hello-world/**
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
jobs:
deploy-hello-world:
defaults:
run:
working-directory: ./hello-world/smart-contract/
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: ./hello-world/smart-contract/package-lock.json
- name: Install dependencies
run: npm install
- name: Deploy
run: |
if npm run deploy | grep -q "Contract deployed"; then
echo "Contract successfully deployed!"
else
echo "Failed to deploy contract ..."
exit 1
fi
env:
JSON_RPC_URL_PUBLIC: ${{ secrets.JSON_RPC_URL_PUBLIC }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}