Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Jun 18, 2024
1 parent d539143 commit 9b9d8b1
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Deploy MACI

on:
push:
branches: [MACI]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up fly
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Set variables for production
run: |
echo "FLY_CONFIG=fly.maci.toml" >> $GITHUB_ENV
echo "GIT_SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
echo "FLY_APP_NAME=maci-indexer-v2" >> $GITHUB_ENV
if: ${{ github.ref == 'refs/heads/main' }}

- name: Build and test
run: |
flyctl -c ${{ env.FLY_CONFIG }} deploy --remote-only --build-only --push --image-label deployment-$GIT_SHA_SHORT
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PRODUCTION }}

- name: Deploy Indexer
run: |
flyctl -c ${{ env.FLY_CONFIG }} deploy --wait-timeout=7200 --env BUILD_TAG=`git rev-parse --short HEAD` --image registry.fly.io/$FLY_APP_NAME:deployment-$GIT_SHA_SHORT --process-groups=indexer
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PRODUCTION }}

- name: Deploy HTTP
run: |
flyctl -c ${{ env.FLY_CONFIG }} deploy --wait-timeout=7200 --env BUILD_TAG=`git rev-parse --short HEAD` --image registry.fly.io/$FLY_APP_NAME:deployment-$GIT_SHA_SHORT --process-groups=web
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PRODUCTION }}

- name: Smoke test
run: |
curl --silent --show-error --fail-with-body https://${{ env.FLY_APP_NAME }}.fly.dev/api/v1/status
# name: Deploy MACI

# on:
# push:
# branches: [MACI]

# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

# jobs:
# build-and-deploy:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Set up fly
# uses: superfly/flyctl-actions/setup-flyctl@master

# - name: Set variables for production
# run: |
# echo "FLY_CONFIG=fly.maci.toml" >> $GITHUB_ENV
# echo "GIT_SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
# echo "FLY_APP_NAME=maci-indexer-v2" >> $GITHUB_ENV
# if: ${{ github.ref == 'refs/heads/main' }}

# - name: Build and test
# run: |
# flyctl -c ${{ env.FLY_CONFIG }} deploy --remote-only --build-only --push --image-label deployment-$GIT_SHA_SHORT
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PRODUCTION }}

# - name: Deploy Indexer
# run: |
# flyctl -c ${{ env.FLY_CONFIG }} deploy --wait-timeout=7200 --env BUILD_TAG=`git rev-parse --short HEAD` --image registry.fly.io/$FLY_APP_NAME:deployment-$GIT_SHA_SHORT --process-groups=indexer
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PRODUCTION }}

# - name: Deploy HTTP
# run: |
# flyctl -c ${{ env.FLY_CONFIG }} deploy --wait-timeout=7200 --env BUILD_TAG=`git rev-parse --short HEAD` --image registry.fly.io/$FLY_APP_NAME:deployment-$GIT_SHA_SHORT --process-groups=web
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PRODUCTION }}

# - name: Smoke test
# run: |
# curl --silent --show-error --fail-with-body https://${{ env.FLY_APP_NAME }}.fly.dev/api/v1/status

0 comments on commit 9b9d8b1

Please sign in to comment.