diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index 0caaf25..ad12e16 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -35,18 +35,19 @@ jobs: - run: bun run build --filter=api - - run: | - echo "{ - \"DATABASE_URL\": \"${{ secrets.DATABASE_URL }}\", - \"COOKIE_SECRET\": \"${{ secrets.COOKIE_SECRET }}\", - \"NEON_API_KEY\": \"${{ secrets.NEON_API_KEY }}\", - \"APP_URL\": \"${{ secrets.APP_URL }}\", - \"CLOUDFLARE_TURNSTILE_SECRET_KEY\": \"${{ secrets.CLOUDFLARE_TURNSTILE_SECRET_KEY }}\", - \"UPSTASH_REDIS_REST_URL\": \"${{ secrets.UPSTASH_REDIS_REST_URL }}\", - \"UPSTASH_REDIS_REST_TOKEN\": \"${{ secrets.UPSTASH_REDIS_REST_TOKEN }}\", - \"CLOUDFLARE_API_TOKEN\": \"${{ secrets.CLOUDFLARE_API_TOKEN }}\", - \"CLOUDFLARE_ACCOUNT_ID\": \"${{ secrets.CLOUDFLARE_ACCOUNT_ID }}\" - }" > secrets.json + - uses: antfu/action-write-config + with: + path: 'secrets.json' + data: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} + NEON_API_KEY: ${{ secrets.NEON_API_KEY }} + APP_URL: ${{ secrets.APP_URL }} + CLOUDFLARE_TURNSTILE_SECRET_KEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SECRET_KEY }} + UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }} + UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - name: Upload secrets uses: cloudflare/wrangler-action@v3.6.1 diff --git a/apps/api/README.md b/apps/api/README.md index 593efbd..ec4dd34 100644 --- a/apps/api/README.md +++ b/apps/api/README.md @@ -1 +1 @@ -# Instant Postgres API \ No newline at end of file +# Instant Postgres API