Skip to content

fix: fix uniqueContributors for vote coming from MRC (#237) #15

fix: fix uniqueContributors for vote coming from MRC (#237)

fix: fix uniqueContributors for vote coming from MRC (#237) #15

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