From cdd14317a9742cfd08a4c8dbeaa0b31f47e581ab Mon Sep 17 00:00:00 2001 From: rupansh Date: Wed, 24 Jan 2024 10:43:33 +0530 Subject: [PATCH] fix: send config to fly deploy --- .../deploy-to-production-on-merge-to-main.yaml | 11 +++++++++++ fly.toml | 3 +++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/deploy-to-production-on-merge-to-main.yaml b/.github/workflows/deploy-to-production-on-merge-to-main.yaml index b2717b0..c782f20 100644 --- a/.github/workflows/deploy-to-production-on-merge-to-main.yaml +++ b/.github/workflows/deploy-to-production-on-merge-to-main.yaml @@ -33,6 +33,17 @@ jobs: env: LEPTOS_BIN_TARGET_TRIPLE: x86_64-unknown-linux-gnu run: cargo leptos build --release + - name: secrets setup + run: | + fly secrets set AUTH_SIGN_KEY=$AUTH_SIGN_KEY --app "hot-or-not-auth" --stage + fly secrets set CLOUDFLARE_ACCOUNT_IDENTIFIER=$CLOUDFLARE_ACCOUNT_IDENTIFIER --app "hot-or-not-auth" --stage + fly secrets set CLOUDFLARE_NAMESPACE_IDENTIFIER=$CLOUDFLARE_NAMESPACE_IDENTIFIER --app "hot-or-not-auth" --stage + fly secrets set CLOUDFLARE_API_TOKEN=$CLOUDFLARE_API_TOKEN --app "hot-or-not-auth" --stage + env: + AUTH_SIGN_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + CLOUDFLARE_NAMESPACE_IDENTIFIER: ${{ secrets.CLOUDFLARE_WORKERS_KV_NAMESPACE_ID }} + CLOUDFLARE_ACCOUNT_IDENTIFIER: ${{ secrets.CLOUDFLARE_WORKERS_KV_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_SECRET }} - uses: superfly/flyctl-actions/setup-flyctl@master - name: Deploy a docker container to Fly.io env: diff --git a/fly.toml b/fly.toml index 64d4708..3a7835e 100644 --- a/fly.toml +++ b/fly.toml @@ -20,3 +20,6 @@ primary_region = "sin" cpu_kind = "shared" cpus = 1 memory_mb = 256 + +[env] + AUTH_IC_URL="https://ic0.app"