Skip to content

adding Image APIs and deploying moving to prod fly account #17

adding Image APIs and deploying moving to prod fly account

adding Image APIs and deploying moving to prod fly account #17

name: Deploy to Fly on push to main
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Create Fly app
run: fly apps create prod-yral-nsfw-classification
env:
FLY_API_TOKEN: ${{ secrets.FLY_IO_DEPLOY_TOKEN }}
- name: Set Fly secrets
run: |
flyctl secrets set --stage --app "prod-yral-nsfw-classification" "SERVICE_CRED=$GOOGLE_CLOUD_EVENTS_BQ_SERVICE_ACCOUNT_KEY_JSON"
env:
FLY_API_TOKEN: ${{ secrets.FLY_IO_DEPLOY_TOKEN }}
SERVICE_CRED: ${{ secrets.GOOGLE_CLOUD_EVENTS_BQ_SERVICE_ACCOUNT_KEY_JSON }}
- name: Deploy a docker container to fly.io
run: flyctl deploy --remote-only --config fly.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_IO_DEPLOY_TOKEN }}