-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.6 KB
/
deploy-on-merge-to-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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: flyctl apps create prod-yral-nsfw-classification --org gobazzinga-inc-584
# 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=$(jq -n -c "${SERVICE_CRED}")"
flyctl secrets set --stage --app "prod-yral-nsfw-classification" "PUBLIC_KEY_TO_VERIFY_INCOMING_CALLS_FROM_FRONTEND_LEPTOS_SSR_SERVICE=${PUBLIC_KEY_TO_VERIFY_INCOMING_CALLS_FROM_FRONTEND_LEPTOS_SSR_SERVICE}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_IO_DEPLOY_TOKEN }}
SERVICE_CRED: ${{ secrets.GOOGLE_CLOUD_EVENTS_BQ_SERVICE_ACCOUNT_KEY_JSON }}
PUBLIC_KEY_TO_VERIFY_INCOMING_CALLS_FROM_FRONTEND_LEPTOS_SSR_SERVICE:
${{ vars.PUBLIC_KEY_TO_VERIFY_INCOMING_CALLS_FROM_FRONTEND_LEPTOS_SSR_SERVICE }}
- name: Check fly status
run: |
flyctl status --app prod-yral-nsfw-classification
env:
FLY_API_TOKEN: ${{ secrets.FLY_IO_DEPLOY_TOKEN }}
- 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 }}