Skip to content

Commit

Permalink
Continuous deployment (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Menezes <[email protected]>
  • Loading branch information
tuler and brunomenezes authored Sep 14, 2023
1 parent a31fdb2 commit 179bc1a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy
on:
push:
branches:
- main
- mainnet
- sepolia
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Aquarium Login
run: npm run sqd:auth
env:
SQD_API_KEY: ${{ secrets.SQD_API_KEY }}

- name: Deploy sepolia
if: github.ref == 'refs/heads/sepolia'
run: npm run sqd:deploy:sepolia -- --no-stream-logs --update

- name: Deploy mainnet
if: github.ref == 'refs/heads/mainnet'
run: npm run sqd:deploy:mainnet -- --no-stream-logs --update
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"sqd:graphql": "sqd serve",
"sqd:auth": "sqd auth -k $SQD_API_KEY",
"sqd:deploy": "sqd deploy -o cartesi -m",
"sqd:deploy:mainnet": "run-s \"sqd:deploy -- {1} .\" -- \"squid-mainnet.yaml\"",
"sqd:deploy:sepolia": "run-s \"sqd:deploy -- {1} .\" -- \"squid-sepolia.yaml\"",
"sqd:deploy:mainnet": "run-s \"sqd:deploy -- {@} .\" -- \"squid-mainnet.yaml\"",
"sqd:deploy:sepolia": "run-s \"sqd:deploy -- {@} .\" -- \"squid-sepolia.yaml\"",
"tsc": "tsc"
},
"dependencies": {
Expand Down

0 comments on commit 179bc1a

Please sign in to comment.