Skip to content

autonomousprice Daily Deploy #84

autonomousprice Daily Deploy

autonomousprice Daily Deploy #84

name: autonomousprice Daily Deploy
on:
push:
paths:
- autonomousprice/**
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
jobs:
deploy-autonomousprice:
defaults:
run:
working-directory: ./autonomousprice/contracts/
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: ./autonomousprice/contracts/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 }}