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 bb5827b..98a36c5 100644 --- a/.github/workflows/deploy-to-production-on-merge-to-main.yaml +++ b/.github/workflows/deploy-to-production-on-merge-to-main.yaml @@ -34,24 +34,24 @@ jobs: LEPTOS_BIN_TARGET_TRIPLE: x86_64-unknown-linux-gnu run: cargo leptos build --release - uses: superfly/flyctl-actions/setup-flyctl@master - - name: secrets setup + - name: config 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 + echo auth_ic_url = \"https://ic0.app\" > AuthConfig.toml + echo auth_sign_key = \"$AUTH_SIGN_KEY\" >> AuthConfig.toml + echo cloudflare_namespace_identifier = \"$CLOUDFLARE_NAMESPACE_IDENTIFIER\" >> AuthConfig.toml + echo cloudflare_api_token = \"$CLOUDFLARE_API_TOKEN\" >> AuthConfig.toml + echo cloudflare_account_identifier = \"$CLOUDFLARE_ACCOUNT_IDENTIFIER\" >> AuthConfig.toml + echo google_client_id = \"$GOOGLE_CLIENT_ID\" >> AuthConfig.toml + echo google_client_secret = \"$GOOGLE_CLIENT_SECRET\" >> AuthConfig.toml + echo google_auth_landing_url = \"https://hot-or-not-auth.fly.dev/google_oauth2_response\" >> AuthConfig.toml 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 }} + GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_ID }} + GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} - name: Deploy a docker container to Fly.io env: FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_AUTH_FLY_IO_GITHUB_ACTION }} - AUTH_SIGN_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }} - CLOUDFLARE_ACCOUNT_IDENTIFIER: ${{ secrets.CLOUDFLARE_WORKERS_KV_ACCOUNT_ID }} - CLOUDFLARE_NAMESPACE_IDENTIFIER: ${{ secrets.CLOUDFLARE_WORKERS_KV_NAMESPACE_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_KV_API_SECRET }} - GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_ID }} - GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }} - run: flyctl deploy --remote-only + run: flyctl deploy --remote-only diff --git a/fly.toml b/fly.toml index 3a7835e..64d4708 100644 --- a/fly.toml +++ b/fly.toml @@ -20,6 +20,3 @@ primary_region = "sin" cpu_kind = "shared" cpus = 1 memory_mb = 256 - -[env] - AUTH_IC_URL="https://ic0.app"