autonomousprice Daily Deploy #84
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
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 }} |