Skip to content

enh: use leveldb for passport (#266) #30

enh: use leveldb for passport (#266)

enh: use leveldb for passport (#266) #30

Workflow file for this run

name: Deploy Branch
on:
push:
branches: [main, release]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set variables for staging
run: |
echo "DEPLOYMENT_ENVIRONMENT=staging" >> $GITHUB_ENV
echo "DEPLOYMENT_URL=https://indexer-staging.fly.dev" >> $GITHUB_ENV
if: ${{ github.ref == 'refs/heads/main' }}
- name: Set variables for production
run: |
echo "DEPLOYMENT_ENVIRONMENT=production" >> $GITHUB_ENV
echo "DEPLOYMENT_URL=https://indexer-production.fly.dev" >> $GITHUB_ENV
if: ${{ github.ref == 'refs/heads/release' }}
- name: Build and test
run: |
flyctl -c fly.${{ env.DEPLOYMENT_ENVIRONMENT }}.toml deploy --remote-only --build-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Deploy
run: |
flyctl -c fly.${{ env.DEPLOYMENT_ENVIRONMENT }}.toml deploy --remote-only --wait-timeout=3600 --env BUILD_TAG=`git rev-parse --short HEAD`
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Smoke test
run: |
curl --silent --show-error --fail-with-body ${{ env.DEPLOYMENT_URL }}/api/v1/status