Fly Deploy #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
inputs: | |
app: | |
description: 'Which app do you want to deploy?' | |
required: true | |
default: 'all' | |
type: choice | |
options: | |
- bot | |
- server | |
- all | |
name: Fly Deploy | |
jobs: | |
deploy: | |
name: Deploy app/s | |
runs-on: ubuntu-latest | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Deploy server | |
if: ${{ github.event.inputs.app == 'server' || github.event.inputs.app == 'all' }} | |
run: flyctl deploy -i ghcr.io/fly-apps/not-midjourney-bot:server --config ./server/fly.toml | |
- name: Stage secrets | |
if: ${{ github.event.inputs.app == 'bot' || github.event.inputs.app == 'all' }} | |
run: flyctl secrets set DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} FOOOCUS_API_URL="http://$(flyctl config show -c ./server/fly.toml | jq -r '.app').flycast" --stage --config ./bot/fly.toml | |
- name: Deploy bot | |
if: ${{ github.event.inputs.app == 'bot' || github.event.inputs.app == 'all' }} | |
run: flyctl deploy -i ghcr.io/fly-apps/not-midjourney-bot:bot --config ./bot/fly.toml |