Skip to content

Mlfeed v3

Mlfeed v3 #9

Workflow file for this run

name: deploy preview
on:
pull_request:
types: [opened, reopened, synchronize, closed]
env:
FLY_API_TOKEN: ${{ secrets.YRAL_GPU_COMPUTE_TASKS_GITHUB_ACTION_FLY_IO_DEPLOYMENT_TOKEN }}
FLY_ORG: gobazzinga-inc-584
jobs:
build_check:
uses: ./.github/workflows/build-check.yml
with:
publish-artifact: true
destroy_preview:
if: ${{github.event.pull_request.state == 'closed'}}
runs-on: ubuntu-latest
environment:
name: pr-${{ github.event.number }}
url: ${{ steps.deploy.outputs.url }}
steps:
- name: Deploy
id: destroy
uses: superfly/[email protected]
preview:
if: ${{ github.event.pull_request.state == 'open'}}
needs: build_check
runs-on: ubuntu-latest
# Only run one deployment at a time per PR.
concurrency:
group: pr-${{ github.event.number }}
# Create a GitHub deployment environment per staging app so it shows up
# in the pull request UI.
environment:
name: pr-${{ github.event.number }}
url: ${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@v3
- name: Download build
uses: actions/download-artifact@v4
with:
name: build-musl
- run: chmod +x target/x86_64-unknown-linux-musl/release/ml-feed-rust
- name: Deploy
id: deploy
uses: superfly/[email protected]
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set secret tokens
run: |
APP_NAME="pr-${{github.event.number}}-yral-dapp-yral-ml-feed-server"
flyctl secrets set --stage --app "$APP_NAME" "UPSTASH_URL=$UPSTASH_URL"
flyctl secrets set --stage --app "$APP_NAME" "UPSTASH_TOKEN=$UPSTASH_TOKEN"
flyctl secrets set --stage --app "$APP_NAME" PROJECT="hot-or-not-feed-intelligence"
flyctl secrets set --stage --app "$APP_NAME" "SERVICE_CRED=$SERVICE_CRED"
flyctl secrets set --stage --app "$APP_NAME" GS_VIDEO_BUCKET="yral-videos"
flyctl secrets set --stage --app "$APP_NAME" "GRPC_OFF_CHAIN_JWT_TOKEN=$GRPC_OFF_CHAIN_JWT_TOKEN"
flyctl secrets set --stage --app "$APP_NAME" "ML_FEED_CACHE_REDIS_URL=$ML_FEED_CACHE_REDIS_URL"
flyctl deploy --app $APP_NAME
env:
UPSTASH_URL: ${{ secrets.UPSTASH_URL }}
UPSTASH_TOKEN: ${{ secrets.UPSTASH_TOKEN }}
SERVICE_CRED: ${{ secrets.SERVICE_CRED }}
GRPC_OFF_CHAIN_JWT_TOKEN: ${{ secrets.ENCODED_JWT_TOKEN_FOR_CALLING_ML_FEED_SERVER_FROM_OFFCHAIN_AGENT_SERVER }}
ML_FEED_CACHE_REDIS_URL: ${{ secrets.YRAL_ML_FEED_CACHE_REDIS_URL }}