Skip to content

Commit

Permalink
ci: add deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
nymmrx committed Jun 12, 2021
1 parent 6e59820 commit 565cd31
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: deploy
on:
schedule:
- cron: '*/10 * * * *' # every 10 minutes

workflow_dispatch:

jobs:
ipfs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v2
with:
path: ./cache
key: ${{ runner.os }}-cache-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-cache-
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install python dependencies
run: pip install -r requirements.txt

- name: Add custom brownie network
env:
WEB3_PROVIDER: ${{ secrets.WEB3_PROVIDER }}
run: brownie networks add Ethereum mainnet-custom host=$WEB3_PROVIDER chainid=1 explorer=https://api.etherscan.io/api

- name: Deploy
env:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_ACCESS_SECRET: ${{ secrets.AWS_ACCESS_SECRET }}
AWS_ZONE_ID: ${{ secrets.AWS_ZONE_ID }}
AWS_ZONE_RECORD: ${{ secrets.AWS_ZONE_RECORD }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}
IPFS_NODE_ADDRESS: ${{ secrets.IPFS_NODE_ADDRESS }}
IPFS_NODE_KEY: ${{ secrets.IPFS_NODE_KEY }}
IPFS_NODE_SECRET: ${{ secrets.IPFS_NODE_SECRET }}
WEB3_PROVIDER: ${{ secrets.WEB3_PROVIDER }}
run: brownie run ipfs --network mainnet-custom

0 comments on commit 565cd31

Please sign in to comment.