Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous deployment #3

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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