From 316e6ddde5fe2d565fc94b8e95425aea84eeeca8 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 20:06:06 +0530 Subject: [PATCH 01/41] added preview for PRs --- .github/workflows/deploy-preview.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy-preview.yml diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml new file mode 100644 index 00000000..ac7fbbd8 --- /dev/null +++ b/.github/workflows/deploy-preview.yml @@ -0,0 +1,32 @@ +name: deploy preview +on: + pull_request: + types: [opened, reopened, synchronize, closed] + +env: + FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} + FLY_REGION: iad + FLY_ORG: personal + +jobs: + staging_app: + 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@v4 + + - name: Deploy + id: deploy + uses: superfly/fly-pr-review-apps@1.0.0 + with: + secrets: CF_TOKEN=${{secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET}} BACKEND_ADMIN_IDENTITY=${{secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY}} COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From 02ff5d85d6dbb3f5e15dd03218e111bb4dd3d651 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:14:02 +0530 Subject: [PATCH 02/41] update version for fly preview action --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index ac7fbbd8..e1fd8298 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -27,6 +27,6 @@ jobs: - name: Deploy id: deploy - uses: superfly/fly-pr-review-apps@1.0.0 + uses: superfly/fly-pr-review-apps@1.2.1 with: secrets: CF_TOKEN=${{secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET}} BACKEND_ADMIN_IDENTITY=${{secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY}} COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From 60ff151b18bc188ab82d326b25504d41ae55e2ff Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:15:27 +0530 Subject: [PATCH 03/41] remove personal org from fly preview --- .github/workflows/deploy-preview.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index e1fd8298..30e55873 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -6,7 +6,6 @@ on: env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} FLY_REGION: iad - FLY_ORG: personal jobs: staging_app: From 946c84360150dd72a8372928c519eae74e68d3bd Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:21:08 +0530 Subject: [PATCH 04/41] fly preview org --- .github/workflows/deploy-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 30e55873..8262d949 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -6,6 +6,7 @@ on: env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} FLY_REGION: iad + FLY_ORG: gobazzinga-inc-584 jobs: staging_app: From d59696e72463cd72eae1927dee31da55a675dce6 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:27:18 +0530 Subject: [PATCH 05/41] set github secrets as env variables for fly preview --- .github/workflows/deploy-preview.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 8262d949..9967623d 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -29,4 +29,12 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN=${{secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET}} BACKEND_ADMIN_IDENTITY=${{secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY}} COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="$REDIS_URL" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" + env: + CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} + BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} + COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} + GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} + FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} + GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From 845d3f86829f97154bd255bc0d5a5dde2f4d2069 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:32:57 +0530 Subject: [PATCH 06/41] rename fly toml file --- .github/workflows/deploy-to-production-on-merge-to-main.yaml | 2 +- fly.toml => fly-prod.toml | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename fly.toml => fly-prod.toml (100%) 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 db267653..e5a76cee 100644 --- a/.github/workflows/deploy-to-production-on-merge-to-main.yaml +++ b/.github/workflows/deploy-to-production-on-merge-to-main.yaml @@ -40,7 +40,7 @@ jobs: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} - name: Deploy a docker container to Fly.io - run: flyctl deploy --remote-only + run: flyctl deploy --remote-only -c fly-prod.toml env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} diff --git a/fly.toml b/fly-prod.toml similarity index 100% rename from fly.toml rename to fly-prod.toml From 94c22c4a7921203c70e53c091e33e8d510add60e Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:40:13 +0530 Subject: [PATCH 07/41] added fly-preview toml --- .github/workflows/deploy-preview.yml | 8 ++++---- fly-preview.toml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 fly-preview.toml diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 9967623d..4f08d392 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -9,7 +9,7 @@ env: FLY_ORG: gobazzinga-inc-584 jobs: - staging_app: + preview: runs-on: ubuntu-latest # Only run one deployment at a time per PR. @@ -30,11 +30,11 @@ jobs: uses: superfly/fly-pr-review-apps@1.2.1 with: secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="$REDIS_URL" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" - env: + path: "fly-preview.toml" + env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} - GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} - FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} + GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} diff --git a/fly-preview.toml b/fly-preview.toml new file mode 100644 index 00000000..5e8f8fd9 --- /dev/null +++ b/fly-preview.toml @@ -0,0 +1,25 @@ +# fly.toml app configuration file generated for hot-or-not-web-leptos-ssr on 2023-11-13T11:04:42+05:30 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +primary_region = "sin" + +[build] + +[http_service] +internal_port = 8080 +force_https = true +auto_stop_machines = true +auto_start_machines = true +min_machines_running = 0 +processes = ["app"] + +[[vm]] +size = "shared-cpu-2x" +memory = "1gb" + +[env] +CF_ACCOUNT_ID = "a209c523d2d9646cc56227dbe6ce3ede" +GOOGLE_REDIRECT_URL = "https://hot-or-not-web-leptos-ssr-staging.fly.dev/auth/google_redirect" +GOOGLE_CLIENT_ID = "1000386990382-3012bbnodvsl8jblr0h8b52d9213c7cn.apps.googleusercontent.com" \ No newline at end of file From 01e2f033f41c564d3d812887f3f43a2601cc98da Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:42:31 +0530 Subject: [PATCH 08/41] fix path argument --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 4f08d392..6f3270a6 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -30,7 +30,7 @@ jobs: uses: superfly/fly-pr-review-apps@1.2.1 with: secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="$REDIS_URL" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" - path: "fly-preview.toml" + path: ./fly-preview.toml env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} From 3089574628e35dc5cd1fa7aae97b307c749bbff9 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 21:44:36 +0530 Subject: [PATCH 09/41] rename fly-preview to fly --- .github/workflows/deploy-preview.yml | 1 - fly-preview.toml => fly.toml | 0 2 files changed, 1 deletion(-) rename fly-preview.toml => fly.toml (100%) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 6f3270a6..828c4c1f 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -30,7 +30,6 @@ jobs: uses: superfly/fly-pr-review-apps@1.2.1 with: secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="$REDIS_URL" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" - path: ./fly-preview.toml env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} diff --git a/fly-preview.toml b/fly.toml similarity index 100% rename from fly-preview.toml rename to fly.toml From f1d857e1acbc0b80afb2a67d3f264ea1dac2212d Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 22:00:05 +0530 Subject: [PATCH 10/41] build musl --- .github/workflows/deploy-preview.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 828c4c1f..37c226b5 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -5,7 +5,6 @@ on: env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} - FLY_REGION: iad FLY_ORG: gobazzinga-inc-584 jobs: @@ -24,6 +23,10 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Download build + uses: actions/download-artifact@v3 + with: + name: build-musl - name: Deploy id: deploy From 8b9388446d9c8beb4904b9bb50a32ce8fb8129ea Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 22:04:35 +0530 Subject: [PATCH 11/41] add execution permission --- .github/workflows/deploy-preview.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 37c226b5..e7938479 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -22,11 +22,12 @@ jobs: url: ${{ steps.deploy.outputs.url }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Download build uses: actions/download-artifact@v3 with: name: build-musl + - run: chmod +x target/x86_64-unknown-linux-musl/release/hot-or-not-web-leptos-ssr - name: Deploy id: deploy From 10114914b4714a2fe987a71fa64934e10895dc7e Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 22:07:04 +0530 Subject: [PATCH 12/41] needs build check --- .github/workflows/deploy-preview.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index e7938479..5b4ee11b 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -8,7 +8,13 @@ env: FLY_ORG: gobazzinga-inc-584 jobs: + build_check: + uses: ./.github/workflows/build-check.yml + with: + publish-artifact: true + preview: + needs: build_check runs-on: ubuntu-latest # Only run one deployment at a time per PR. From d8a51dbfe5f5221ed558ad44a738c161b6d0f64e Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 22:35:05 +0530 Subject: [PATCH 13/41] fix lint issue --- ssr/src/fallback.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ssr/src/fallback.rs b/ssr/src/fallback.rs index 3e95a265..946d2bbb 100644 --- a/ssr/src/fallback.rs +++ b/ssr/src/fallback.rs @@ -34,11 +34,6 @@ async fn get_static_file(uri: Uri, root: &str) -> Result, (Status .unwrap(); // `ServeDir` implements `tower::Service` so we can call it with `tower::ServiceExt::oneshot` // This path is relative to the cargo root - match ServeDir::new(root).oneshot(req).await { - Ok(res) => Ok(res.into_response()), - Err(err) => Err(( - StatusCode::INTERNAL_SERVER_ERROR, - format!("Something went wrong: {err}"), - )), - } + let res = ServeDir::new(root).oneshot(req).await; + Ok(res.into_response()) } From 0798227099e9cff99066c94371d81fb9a505c0e0 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Mon, 12 Aug 2024 22:38:40 +0530 Subject: [PATCH 14/41] fix lint issues --- ssr/src/fallback.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssr/src/fallback.rs b/ssr/src/fallback.rs index 946d2bbb..057856fb 100644 --- a/ssr/src/fallback.rs +++ b/ssr/src/fallback.rs @@ -34,6 +34,6 @@ async fn get_static_file(uri: Uri, root: &str) -> Result, (Status .unwrap(); // `ServeDir` implements `tower::Service` so we can call it with `tower::ServiceExt::oneshot` // This path is relative to the cargo root - let res = ServeDir::new(root).oneshot(req).await; - Ok(res.into_response()) + let res = ServeDir::new(root).oneshot(req).await; + Ok(res.into_response()) } From 08a7130bde7ed5a09a3cae0406fa6d09d03fc077 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 17:42:22 +0530 Subject: [PATCH 15/41] set redis url directly from secrets --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 5b4ee11b..ecf57932 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,7 +39,7 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="$REDIS_URL" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" + secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} From e3a08ee990de8c23e044b1d24597033697f9691a Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 17:57:39 +0530 Subject: [PATCH 16/41] update fly secrets --- .github/workflows/deploy-preview.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index ecf57932..2f4e9e2a 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,11 +39,5 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" - env: - CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} - BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} - COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} - REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} - GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} - GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + secrets: CF_TOKEN= "${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" BACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" COOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" GRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" + From be24f90bbe48b7fdd6002d8125a39cde1822286e Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 18:13:52 +0530 Subject: [PATCH 17/41] update fly secrets --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 2f4e9e2a..a48df396 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,5 +39,5 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN= "${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" BACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" COOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" GRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" + secrets: CF_TOKEN=${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY=${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} REDIS_URL=${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}} GOOGLE_CLIENT_SECRET=${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From 7c9cd72db3b08abf43e92204bd17c610c159ec0f Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 18:23:47 +0530 Subject: [PATCH 18/41] Revert "update fly secrets" This reverts commit be24f90bbe48b7fdd6002d8125a39cde1822286e. --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index a48df396..2f4e9e2a 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,5 +39,5 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN=${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY=${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} REDIS_URL=${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}} GOOGLE_CLIENT_SECRET=${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + secrets: CF_TOKEN= "${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" BACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" COOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" GRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" From 171f0dc3f971ad9d28cb025644d326bcd678a87a Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 18:24:03 +0530 Subject: [PATCH 19/41] Revert "update fly secrets" This reverts commit e3a08ee990de8c23e044b1d24597033697f9691a. --- .github/workflows/deploy-preview.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 2f4e9e2a..ecf57932 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,5 +39,11 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN= "${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" BACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" COOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" GRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" - + secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" + env: + CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} + BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} + COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} + GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} + GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From e57054969d23466f4adf3259bd69edb956d4c549 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 18:25:00 +0530 Subject: [PATCH 20/41] update fly secrets --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index ecf57932..42997818 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,7 +39,7 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN="$CF_TOKEN" BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" COOKIE_KEY="$COOKIE_KEY" REDIS_URL="${{secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING}}" GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" + secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=$REDIS_URL GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} From 402e46298fe81ae20ab9a709eb2dfb3d679ffb0f Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 20:52:12 +0530 Subject: [PATCH 21/41] remove build check run on pull request --- .github/workflows/build-check.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 34ea2c98..5f115fee 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -8,9 +8,6 @@ on: required: false type: boolean workflow_dispatch: - pull_request: - branches: - - main jobs: build_check: From da5e520e2f79e73c525c1947323a9a3c1059b9f6 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 20:53:04 +0530 Subject: [PATCH 22/41] update redis url in deploy preview github action --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 42997818..845f4613 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,7 +39,7 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=$REDIS_URL GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN + secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} From 2979aded7ff2623d7689bd440928970e1bc834b2 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 21:04:13 +0530 Subject: [PATCH 23/41] add top level envs --- .github/workflows/deploy-preview.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 845f4613..07749f18 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -6,6 +6,12 @@ on: env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} FLY_ORG: gobazzinga-inc-584 + CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} + BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} + COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} + GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} + GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} jobs: build_check: @@ -39,11 +45,4 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN - env: - CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} - BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} - COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} - REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} - GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} - GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=$REDIS_URL GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN From e2c1f75c4862b5318c1401983681d72926d76489 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 21:15:49 +0530 Subject: [PATCH 24/41] remove lint check for testing --- .github/workflows/build-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 5f115fee..62d6ab22 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -68,10 +68,10 @@ jobs: packages: musl-tools # provides musl-gcc version: 1.0 - - name: lint check - run: | - cargo fmt --check - cargo clippy --no-deps --all-features --release -- -Dwarnings + # - name: lint check + # run: | + # cargo fmt --check + # cargo clippy --no-deps --all-features --release -- -Dwarnings - name: Build the Leptos project to `musl` output run: cargo leptos build --release --lib-features release-lib --bin-features release-bin From 295e2049b3d64feda0afd3b327bfec54aee5a6ac Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 21:16:14 +0530 Subject: [PATCH 25/41] Revert "add top level envs" This reverts commit 2979aded7ff2623d7689bd440928970e1bc834b2. --- .github/workflows/deploy-preview.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 07749f18..845f4613 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -6,12 +6,6 @@ on: env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} FLY_ORG: gobazzinga-inc-584 - CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} - BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} - COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} - REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} - GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} - GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} jobs: build_check: @@ -45,4 +39,11 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=$REDIS_URL GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN + secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN + env: + CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} + BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} + COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} + GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} + GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From abde4d76be18527ce85d1a8e6619a46deefcc1fa Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 21:21:05 +0530 Subject: [PATCH 26/41] add explicit quotes --- .github/workflows/deploy-preview.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 845f4613..f31e8658 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,11 +39,10 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 with: - secrets: CF_TOKEN=$CF_TOKEN BACKEND_ADMIN_IDENTITY=$BACKEND_ADMIN_IDENTITY COOKIE_KEY=$COOKIE_KEY REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET GRPC_AUTH_TOKEN=$GRPC_AUTH_TOKEN - env: - CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} - BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} - COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} - REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} - GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} - GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + secrets: | + CF_TOKEN=\"${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}\" + BACKEND_ADMIN_IDENTITY=\"${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}\" + COOKIE_KEY=\"${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}\" + REDIS_URL=\"${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}\" + GOOGLE_CLIENT_SECRET=\"${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}\" + GRPC_AUTH_TOKEN=\"${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}\" From 05d488594d7269ec9aad5329daeb95810864a22e Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:01:00 +0530 Subject: [PATCH 27/41] update github action to use ravi fly.io github action --- .github/workflows/deploy-preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index f31e8658..961b9390 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -37,11 +37,11 @@ jobs: - name: Deploy id: deploy - uses: superfly/fly-pr-review-apps@1.2.1 + uses: ravibazz/fly-pr-review-apps@1.0.0 with: secrets: | CF_TOKEN=\"${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}\" - BACKEND_ADMIN_IDENTITY=\"${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}\" + BACKEND_ADMIN_IDENTITY='${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}' COOKIE_KEY=\"${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}\" REDIS_URL=\"${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}\" GOOGLE_CLIENT_SECRET=\"${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}\" From 0a400180ed898dcf9172f9415f47c870bfc41b36 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:04:56 +0530 Subject: [PATCH 28/41] update github action --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 961b9390..6ec90399 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -37,7 +37,7 @@ jobs: - name: Deploy id: deploy - uses: ravibazz/fly-pr-review-apps@1.0.0 + uses: ravibazz/fly-pr-review-apps with: secrets: | CF_TOKEN=\"${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}\" From e3c47efc68acf8dcd9ee29ef59dd04ffa575b155 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:09:59 +0530 Subject: [PATCH 29/41] update fly preview action version --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 6ec90399..3b61a591 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -37,7 +37,7 @@ jobs: - name: Deploy id: deploy - uses: ravibazz/fly-pr-review-apps + uses: ravibazz/fly-pr-review-apps@v1.0.0 with: secrets: | CF_TOKEN=\"${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}\" From 50d0cb42c2db94baf9b73e96daf92df49d987d45 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:16:03 +0530 Subject: [PATCH 30/41] update github action preview --- .github/workflows/deploy-preview.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 3b61a591..4687e3e1 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -40,9 +40,9 @@ jobs: uses: ravibazz/fly-pr-review-apps@v1.0.0 with: secrets: | - CF_TOKEN=\"${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}\" - BACKEND_ADMIN_IDENTITY='${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}' - COOKIE_KEY=\"${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}\" - REDIS_URL=\"${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}\" - GOOGLE_CLIENT_SECRET=\"${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}\" - GRPC_AUTH_TOKEN=\"${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}\" + CF_TOKEN="${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" + BACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" + COOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" + REDIS_URL="${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}" + GOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" + GRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" From 003093105d08848fdef28246c0c14adb5e2e5c1d Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:31:54 +0530 Subject: [PATCH 31/41] update github action preview --- .github/workflows/deploy-preview.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 4687e3e1..25b7b307 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -40,9 +40,9 @@ jobs: uses: ravibazz/fly-pr-review-apps@v1.0.0 with: secrets: | - CF_TOKEN="${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" - BACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" - COOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" - REDIS_URL="${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}" - GOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" - GRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" + CF_TOKEN=${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} + BACKEND_ADMIN_IDENTITY=${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} + COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} + GOOGLE_CLIENT_SECRET=${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} + GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} From 688d6aa072749241fa4d6433cd8757c00e571328 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:38:56 +0530 Subject: [PATCH 32/41] print redis url --- ssr/src/init/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ssr/src/init/mod.rs b/ssr/src/init/mod.rs index b542db46..4a5e7169 100644 --- a/ssr/src/init/mod.rs +++ b/ssr/src/init/mod.rs @@ -130,6 +130,7 @@ impl AppStateBuilder { #[cfg(not(feature = "local-bin"))] { redis_url = env::var("REDIS_URL").expect("`REDIS_URL` is required!"); + println!("REDIS_URL {}", &redis_url); } KVStoreImpl::Redis(RedisKV::new(&redis_url).await.unwrap()) } From 0ffd9c85ac05e9a9e8712217e844aab95e4ee31f Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:45:13 +0530 Subject: [PATCH 33/41] update fly secrets --- .github/workflows/deploy-preview.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 25b7b307..e6c6b460 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,10 +39,4 @@ jobs: id: deploy uses: ravibazz/fly-pr-review-apps@v1.0.0 with: - secrets: | - CF_TOKEN=${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} - BACKEND_ADMIN_IDENTITY=${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} - COOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} - REDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} - GOOGLE_CLIENT_SECRET=${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} - GRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + secrets: "CF_TOKEN=${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} \nBACKEND_ADMIN_IDENTITY=${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} \nCOOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} \nREDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} \nGOOGLE_CLIENT_SECRET=${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} \nGRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" \ No newline at end of file From ab07631bef36d049431e3e8a1124fad7e78f4d13 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 22:57:28 +0530 Subject: [PATCH 34/41] update fly secrets --- .github/workflows/deploy-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index e6c6b460..f4b8313f 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,4 +39,4 @@ jobs: id: deploy uses: ravibazz/fly-pr-review-apps@v1.0.0 with: - secrets: "CF_TOKEN=${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} \nBACKEND_ADMIN_IDENTITY=${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} \nCOOKIE_KEY=${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} \nREDIS_URL=${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} \nGOOGLE_CLIENT_SECRET=${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} \nGRPC_AUTH_TOKEN=${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" \ No newline at end of file + secrets: CF_TOKEN="${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" \nBACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" \nCOOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" \nREDIS_URL="${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}" \nGOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" \nGRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" \ No newline at end of file From 0125ecc57def3d17fbee2aef269f9f91ffee3225 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 23:14:14 +0530 Subject: [PATCH 35/41] added fly secrets using flyctl --- .github/workflows/deploy-preview.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index f4b8313f..7ecaabd4 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -37,6 +37,22 @@ jobs: - name: Deploy id: deploy - uses: ravibazz/fly-pr-review-apps@v1.0.0 - with: - secrets: CF_TOKEN="${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }}" \nBACKEND_ADMIN_IDENTITY="${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }}" \nCOOKIE_KEY="${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}" \nREDIS_URL="${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }}" \nGOOGLE_CLIENT_SECRET="${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }}" \nGRPC_AUTH_TOKEN="${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }}" \ No newline at end of file + uses: superfly/fly-pr-review-apps@1.2.1 + + - name: Set secret tokens + run: | + APP_NAME="pr-${{github.event.number}}-go-bazzinga-hot-or-not-web-leptos-ssr" + flyctl secrets set CF_TOKEN="$CF_TOKEN" --app "$APP_NAME" --stage + flyctl secrets set BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" --app "$APP_NAME" --stage + flyctl secrets set COOKIE_KEY="$COOKIE_KEY" --app "$APP_NAME" --stage + flyctl secrets set REDIS_URL="$REDIS_URL" --app "$APP_NAME" --stage + flyctl secrets set GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET --app "$APP_NAME" --stage + flyctl secrets set GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" --app "$APP_NAME" --stage + env: + CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} + BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} + COOKIE_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} + REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} + GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} + FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} + GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} \ No newline at end of file From fa011a17be34840af9a878a4c84298f4af06aded Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 23:21:49 +0530 Subject: [PATCH 36/41] update flyctl --- .github/workflows/deploy-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 7ecaabd4..7b1ae392 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -39,6 +39,7 @@ jobs: id: deploy uses: superfly/fly-pr-review-apps@1.2.1 + - uses: superfly/flyctl-actions/setup-flyctl@master - name: Set secret tokens run: | APP_NAME="pr-${{github.event.number}}-go-bazzinga-hot-or-not-web-leptos-ssr" From 1c49ea51c5bd44710004b24766d577af817eaaf5 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 23:31:03 +0530 Subject: [PATCH 37/41] update github preview workflow --- .github/workflows/deploy-preview.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 7b1ae392..8881f022 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -43,12 +43,12 @@ jobs: - name: Set secret tokens run: | APP_NAME="pr-${{github.event.number}}-go-bazzinga-hot-or-not-web-leptos-ssr" - flyctl secrets set CF_TOKEN="$CF_TOKEN" --app "$APP_NAME" --stage - flyctl secrets set BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" --app "$APP_NAME" --stage - flyctl secrets set COOKIE_KEY="$COOKIE_KEY" --app "$APP_NAME" --stage - flyctl secrets set REDIS_URL="$REDIS_URL" --app "$APP_NAME" --stage - flyctl secrets set GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET --app "$APP_NAME" --stage - flyctl secrets set GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" --app "$APP_NAME" --stage + flyctl secrets set CF_TOKEN="$CF_TOKEN" --app "$APP_NAME" + flyctl secrets set BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" --app "$APP_NAME" + flyctl secrets set COOKIE_KEY="$COOKIE_KEY" --app "$APP_NAME" + flyctl secrets set REDIS_URL="$REDIS_URL" --app "$APP_NAME" + flyctl secrets set GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET --app "$APP_NAME" + flyctl secrets set GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" --app "$APP_NAME" env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} From abbbab4be596e836357e0e386992a6dce9a3e37b Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 13 Aug 2024 23:40:34 +0530 Subject: [PATCH 38/41] Revert "print redis url" This reverts commit 688d6aa072749241fa4d6433cd8757c00e571328. --- ssr/src/init/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/ssr/src/init/mod.rs b/ssr/src/init/mod.rs index 4a5e7169..b542db46 100644 --- a/ssr/src/init/mod.rs +++ b/ssr/src/init/mod.rs @@ -130,7 +130,6 @@ impl AppStateBuilder { #[cfg(not(feature = "local-bin"))] { redis_url = env::var("REDIS_URL").expect("`REDIS_URL` is required!"); - println!("REDIS_URL {}", &redis_url); } KVStoreImpl::Redis(RedisKV::new(&redis_url).await.unwrap()) } From 4686e628ed51dee486984b95f3c8a0904133e2a4 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Wed, 14 Aug 2024 13:21:21 +0530 Subject: [PATCH 39/41] stage secrets and deploy again --- .github/workflows/deploy-preview.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 8881f022..a7059baa 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -43,12 +43,12 @@ jobs: - name: Set secret tokens run: | APP_NAME="pr-${{github.event.number}}-go-bazzinga-hot-or-not-web-leptos-ssr" - flyctl secrets set CF_TOKEN="$CF_TOKEN" --app "$APP_NAME" - flyctl secrets set BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" --app "$APP_NAME" - flyctl secrets set COOKIE_KEY="$COOKIE_KEY" --app "$APP_NAME" - flyctl secrets set REDIS_URL="$REDIS_URL" --app "$APP_NAME" - flyctl secrets set GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET --app "$APP_NAME" - flyctl secrets set GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" --app "$APP_NAME" + flyctl secrets set CF_TOKEN="$CF_TOKEN" --app "$APP_NAME" --stage + flyctl secrets set BACKEND_ADMIN_IDENTITY="$BACKEND_ADMIN_IDENTITY" --app "$APP_NAME" --stage + flyctl secrets set COOKIE_KEY="$COOKIE_KEY" --app "$APP_NAME" --stage + flyctl secrets set REDIS_URL="$REDIS_URL" --app "$APP_NAME" --stage + flyctl secrets set GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET --app "$APP_NAME" --stage + flyctl secrets set GRPC_AUTH_TOKEN="$GRPC_AUTH_TOKEN" --app "$APP_NAME" --stage env: CF_TOKEN: ${{ secrets.CLOUDFLARE_STREAM_IMAGES_ANALYTICS_READ_WRITE_SECRET }} BACKEND_ADMIN_IDENTITY: ${{ secrets.YRAL_WHITELISTED_BACKEND_GLOBAL_ADMIN_SECRET_KEY }} @@ -56,4 +56,10 @@ jobs: REDIS_URL: ${{ secrets.AUTH_FLY_IO_UPSTASH_REDIS_DATABASE_CONNECTION_STRING }} GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} - GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} \ No newline at end of file + GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} + - name: + run: | + APP_NAME="pr-${{github.event.number}}-go-bazzinga-hot-or-not-web-leptos-ssr" + flyctl deploy --app $APP_NAME + env: + FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} \ No newline at end of file From 275557d36b3cfc668062aef81827ed28c1226365 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Fri, 16 Aug 2024 12:37:29 +0530 Subject: [PATCH 40/41] enable lint check in build workflow --- .github/workflows/build-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 62d6ab22..5f115fee 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -68,10 +68,10 @@ jobs: packages: musl-tools # provides musl-gcc version: 1.0 - # - name: lint check - # run: | - # cargo fmt --check - # cargo clippy --no-deps --all-features --release -- -Dwarnings + - name: lint check + run: | + cargo fmt --check + cargo clippy --no-deps --all-features --release -- -Dwarnings - name: Build the Leptos project to `musl` output run: cargo leptos build --release --lib-features release-lib --bin-features release-bin From e094e37e54c595810ffc3fe239e7539148d7357e Mon Sep 17 00:00:00 2001 From: ravibazz Date: Fri, 16 Aug 2024 12:51:29 +0530 Subject: [PATCH 41/41] added step name --- .github/workflows/deploy-preview.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index a7059baa..a816d956 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -57,7 +57,8 @@ jobs: GOOGLE_CLIENT_SECRET: ${{ secrets.STAGING_TEMPORARY_GOOGLE_CLIENT_SECRET }} FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_WEB_LEPTOS_SSR_FLY_IO_GITHUB_ACTION }} GRPC_AUTH_TOKEN: ${{ secrets.OFF_CHAIN_AGENT_GRPC_AUTH_TOKEN }} - - name: + + - name: Deploy Secrets run: | APP_NAME="pr-${{github.event.number}}-go-bazzinga-hot-or-not-web-leptos-ssr" flyctl deploy --app $APP_NAME