-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from edenartlab/feat/ci
add ci
- Loading branch information
Showing
7 changed files
with
106 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy to Modal Production | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
if: github.event.pull_request.merged == true || github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
env: | ||
DB: PROD | ||
|
||
steps: | ||
- name: Checkout main repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout workflows repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: edenartlab/workflows | ||
path: workflows | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Rye | ||
run: | | ||
curl -sSf https://rye-up.com/get | bash | ||
echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: rye sync | ||
|
||
- name: Configure Modal token | ||
run: | | ||
echo "${{ secrets.MODAL_TOKEN_ID }}" > ~/.modal/token-id | ||
echo "${{ secrets.MODAL_TOKEN_SECRET }}" > ~/.modal/token-secret | ||
- name: Deploy to Modal | ||
run: rye run modal deploy ./eve/api.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy to Modal Staging | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
deploy: | ||
if: github.event.pull_request.merged == true || github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
env: | ||
DB: STAGE | ||
|
||
steps: | ||
- name: Checkout main repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout workflows repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: edenartlab/workflows | ||
path: workflows | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Rye | ||
run: | | ||
curl -sSf https://rye-up.com/get | bash | ||
echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: rye sync | ||
|
||
- name: Configure Modal token | ||
run: | | ||
echo "${{ secrets.MODAL_TOKEN_ID }}" > ~/.modal/token-id | ||
echo "${{ secrets.MODAL_TOKEN_SECRET }}" > ~/.modal/token-secret | ||
- name: Deploy to Modal | ||
run: rye run modal deploy ./eve/api.py |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import os | ||
from web3 import Web3 | ||
from dotenv import load_dotenv | ||
|
||
|
||
async def handler(args: dict, db: str): | ||
|
This file was deleted.
Oops, something went wrong.